Skip to content

Commit 4c6b0df

Browse files
authored
[internal] Update GitHub Actions workflow files (#78)
1 parent b9556e1 commit 4c6b0df

File tree

5 files changed

+311
-254
lines changed

5 files changed

+311
-254
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
name: cleanup
2+
on:
3+
schedule:
4+
- cron: 0 1 * * *
15
jobs:
26
remove-old-artifacts:
37
runs-on: ubuntu-latest
@@ -7,7 +11,3 @@ jobs:
711
with:
812
age: 1 month
913
skip-tags: true
10-
name: cleanup
11-
on:
12-
schedule:
13-
- cron: 0 1 * * *

.github/workflows/cleanup-artifacts.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,38 @@
1+
name: command-dispatch
2+
on:
3+
issue_comment:
4+
types:
5+
- created
6+
- edited
17
env:
28
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5-
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }}
69
PROVIDER: command
710
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
811
PULUMI_API: https://api.pulumi-staging.io
9-
PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/..
1012
PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget
13+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
14+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
15+
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }}
1116
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
12-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
1317
TRAVIS_OS_NAME: linux
18+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
19+
PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/..
20+
AWS_REGION: us-west-2
1421
jobs:
1522
command-dispatch-for-testing:
16-
if: ${{ github.event.issue.pull_request }}
17-
name: command-dispatch-for-testing
1823
runs-on: ubuntu-latest
24+
name: command-dispatch-for-testing
1925
steps:
2026
- name: Checkout Repo
2127
uses: actions/checkout@v2
28+
with:
29+
lfs: true
2230
- uses: peter-evans/slash-command-dispatch@v2
2331
with:
32+
token: ${{ secrets.PULUMI_BOT_TOKEN }}
33+
reaction-token: ${{ secrets.GITHUB_TOKEN }}
2434
commands: run-acceptance-tests
25-
issue-type: pull-request
2635
permission: write
27-
reaction-token: ${{ secrets.GITHUB_TOKEN }}
36+
issue-type: pull-request
2837
repository: pulumi/pulumi-command
29-
token: ${{ secrets.PULUMI_BOT_TOKEN }}
30-
name: command-dispatch
31-
on:
32-
issue_comment:
33-
types:
34-
- created
35-
- edited
38+
if: ${{ github.event.issue.pull_request }}

.github/workflows/pull-request.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: pull-request
2+
on:
3+
pull_request_target: {}
4+
env:
5+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6+
PROVIDER: command
7+
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
8+
PULUMI_API: https://api.pulumi-staging.io
9+
PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget
10+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
11+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
12+
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }}
13+
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
14+
TRAVIS_OS_NAME: linux
15+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
16+
PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/..
17+
AWS_REGION: us-west-2
18+
jobs:
19+
comment-on-pr:
20+
runs-on: ubuntu-latest
21+
name: comment-on-pr
22+
steps:
23+
- name: Checkout Repo
24+
uses: actions/checkout@v2
25+
with:
26+
lfs: true
27+
- name: Comment PR
28+
uses: thollander/actions-comment-pull-request@v1
29+
with:
30+
message: >
31+
PR is now waiting for a maintainer to run the acceptance tests.
32+
33+
**Note for the maintainer:** To run the acceptance tests, please comment */run-acceptance-tests* on the PR
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
if: github.event.pull_request.head.repo.full_name != github.repository

0 commit comments

Comments
 (0)