Skip to content

Commit

Permalink
fixup! Provide env var to use gh CLI in GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
maximiliankolb committed Jan 17, 2025
1 parent 1804b64 commit c4ffa1a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ on:
types:
- completed

env:
GH_TOKEN: ${{ github.token }}

jobs:
preview-failed:
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion != 'success'
Expand All @@ -19,6 +16,8 @@ jobs:

- name: Download metadata artifact
run: gh run download '${{ github.event.workflow_run.id }}' -n pr
env:
GH_TOKEN: ${{ github.token }}

- name: Unzip artifact
run: unzip pr.zip
Expand All @@ -40,6 +39,8 @@ jobs:

- name: Download metadata artifact
run: gh run download '${{ github.event.workflow_run.id }}' -n pr
env:
GH_TOKEN: ${{ github.token }}

- name: Unzip artifact
run: unzip pr.zip
Expand All @@ -49,6 +50,8 @@ jobs:

- name: Download other artifacts
run: gh run download '${{ github.event.workflow_run.id }}' -n 'foreman-docs-html-${{ fromJSON(env.PR_DATA).branch_name }}' -n foreman-docs-html-base -n foreman-docs-web-master
env:
GH_TOKEN: ${{ github.token }}

- name: Set preview domain
run: echo "PREVIEW_DOMAIN=$(echo ${{ github.repository }} | tr / - )-${{ github.job }}-pr-${{ fromJSON(env.PR_DATA).pr_number }}.surge.sh" >> $GITHUB_ENV
Expand Down

0 comments on commit c4ffa1a

Please sign in to comment.