Skip to content

Commit

Permalink
Fix Chromatic SHA
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Nov 26, 2021
1 parent 8a3d43a commit 9f24189
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ jobs:
- run: '! ls BACKPORT_TODO'
- run: /opt/google/chrome/chrome --version

- uses: actions/setup-node@v1
with:
node-version: '16.x'
- name: Get sha
id: sha
run: echo "::set-output name=sha::$(jq -r .pull_request.head.sha < ${GITHUB_EVENT_PATH})"
if: env.HAS_SECRETS == 'HAS_SECRETS' && github.event_name == 'pull_request_target'

- uses: actions/checkout@v2
with:
Expand All @@ -45,9 +46,13 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ env.GITHUB_HEAD_REF }}
ref: ${{ steps.sha.outputs.sha }}
if: github.event_name == 'pull_request_target'

- uses: actions/setup-node@v1
with:
node-version: '16.x'

- uses: camptocamp/initialise-gopass-summon-action@v2
with:
ci-gpg-private-key: ${{secrets.CI_GPG_PRIVATE_KEY}}
Expand Down Expand Up @@ -125,10 +130,6 @@ jobs:
- name: Publish Storybook to Chromatic to run visual tests
run: npm run chromatic -- --project-token=$(gopass show gs/ci/chromatic/ngeo_token)
if: env.HAS_SECRETS == 'HAS_SECRETS' && github.event_name != 'pull_request_target'
- name: Get sha
id: sha
run: echo "::set-output name=sha::$(git rev-parse HEAD)"
if: env.HAS_SECRETS == 'HAS_SECRETS' && github.event_name == 'pull_request_target'
- name: Publish Storybook to Chromatic to run visual tests
run: GITHUB_SHA=${GITHUB_SHA_} npm run chromatic -- --project-token=$(gopass show gs/ci/chromatic/ngeo_token) --branch-name=${GITHUB_HEAD_REF}
if: env.HAS_SECRETS == 'HAS_SECRETS' && github.event_name == 'pull_request_target'
Expand Down

0 comments on commit 9f24189

Please sign in to comment.