Ensuring the correct ref is checked out as part of a command dispatch
MODIFY
.github/workflows/command_dispatch.yml
.github/workflows/command_dispatch.yml
@@ -13,7 +13,7 @@ jobs:
with:
token: ${{ secrets.EVENT_PAT }}
reaction-token: ${{ secrets.GITHUB_TOKEN }}
- commands: run-example-tests
+ commands: run-example-tests commitRef=${{ github.head_ref }}
permission: write
issue-type: pull-request
repository: pulumi/examples

MODIFY
.github/workflows/run-tests-command.yml
.github/workflows/run-tests-command.yml
@@ -25,6 +25,7 @@ env:
GOOGLE_ZONE: "us-central1-a"
PACKET_AUTH_TOKEN: ${{ secrets.PACKET_AUTH_TOKEN }}
LINODE_API_TOKEN: ${{ secrets.LINODE_API_TOKEN }}
+ COMMIT_REF: ${{ github.event.client_payload.slash_command.args.named.commitRef }}
jobs:
comment-notification:
runs-on: ubuntu-latest
@@ -129,6 +130,8 @@ jobs:
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
+ with:
+ ref: ${{ env.COMMIT_REF }}
- name: Setup node
uses: actions/setup-node@v1
with:

Ensuring the correct ref is checked out as part of a command dispatch