Skip to content

Commit dab9a60

Browse files
Simplified Acctest Command Dispatching Workflow (#447)
## 📝 Description When we created the acctest command workflows, GitHub doesn't support using `GITHUB_TOKEN` to trigger another workflow [but later they added some exception](https://github.blog/changelog/2022-09-08-github-actions-use-github_token-with-workflow_dispatch-and-repository_dispatch/). We used a workaround to generate a token as a GitHub App to trigger an `repository_dispatch` event to trigger the integration test. With the newly added exception, now I believe we can trigger the integration test directly by the `repository_dispatch` event triggered by the built-in `GITHUB_TOKEN`, and we can now remove the action that was used to generate GitHub App token. ## ✔️ How to Test Will only be testable in this repo after merging. Success on my forked repo: zliang-akamai/linodego#2 (comment)
1 parent 6c194db commit dab9a60

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

.github/workflows/e2e-suite-pr-command.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,10 @@ jobs:
99
runs-on: ubuntu-latest
1010
if: ${{ github.event.issue.pull_request }}
1111
steps:
12-
- name: Generate App Installation Token
13-
id: generate_token
14-
uses: tibdex/github-app-token@v1
15-
with:
16-
app_id: ${{ secrets.DX_ACCTEST_APP_ID }}
17-
private_key: ${{ secrets.DX_ACCTEST_PRIV_KEY }}
18-
1912
- name: Slash Command Dispatch
20-
uses: peter-evans/slash-command-dispatch@v1
21-
env:
22-
TOKEN: ${{ steps.generate_token.outputs.token }}
13+
uses: peter-evans/slash-command-dispatch@v3
2314
with:
24-
token: ${{ env.TOKEN }}
25-
reaction-token: ${{ secrets.GITHUB_TOKEN }}
15+
token: ${{ secrets.GITHUB_TOKEN }}
2616
issue-type: pull-request
2717
commands: acctest
2818
named-args: true

0 commit comments

Comments
 (0)