From c4ffa1acaf4ab8951a276ea233df9f8567eac213 Mon Sep 17 00:00:00 2001 From: Maximilian Kolb Date: Fri, 17 Jan 2025 14:39:19 +0100 Subject: [PATCH] fixup! Provide env var to use gh CLI in GHA --- .github/workflows/preview.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 289d7e51d0..a05d56ffda 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -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' @@ -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 @@ -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 @@ -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