Skip to content

Commit bd9e152

Browse files
authored
use the provided GITHUB_TOKEN instead of a provided one (#14173)
Recently updating these shopify provided github tokens to GITHUB_TOKEN, which is provided by github in the run context of the job, has been needed to get old jobs running: I think a credential changed or expired at the org scope. Unsure if this will fix the problem, but should give us next steps. Also added a `workflow_dispatch` to this action with a configurable branch name, so we can test the deploy flow from PRs in the future, no more CI golf.
1 parent 8044489 commit bd9e152

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/deploy-polaris.shopify.com.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ on:
66
- main
77
paths:
88
- 'polaris.shopify.com/**'
9+
workflow_dispatch:
10+
inputs:
11+
branch:
12+
description: 'Branch to deploy from'
13+
required: true
14+
default: 'main'
915

1016
jobs:
1117
trigger-deploy:
@@ -15,11 +21,11 @@ jobs:
1521
- name: Trigger deploy polaris.shopify.com
1622
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
1723
with:
18-
github-token: ${{ secrets.SHOPIFY_GH_ACCESS_TOKEN }}
24+
github-token: ${{ secrets.GITHUB_TOKEN }}
1925
script: |
2026
await github.rest.actions.createWorkflowDispatch({
2127
owner: "shopify",
2228
repo: "polaris-site-prod-kit",
2329
workflow_id: "build-and-deploy.yml",
24-
ref: "main",
30+
ref: "{{ inputs.branch }}",
2531
});

0 commit comments

Comments
 (0)