From c9a1113d897d611087a8138367f7ee9fe76fba29 Mon Sep 17 00:00:00 2001 From: Adam Cheng <52572642+adamchengtkc@users.noreply.github.com> Date: Tue, 12 Dec 2023 10:46:08 +0100 Subject: [PATCH] BLD: fix token --- .github/workflows/docs.yml | 7 ++----- .github/workflows/publish.yml | 4 ++-- .github/workflows/snyk.yml | 14 +++++++------- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index dd5171f..7c359f8 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -4,13 +4,10 @@ name: docs on: - workflow_dispatch: workflow_call: secrets: - GITHUB_TOKEN: + GITHUB_TOKEN_WORKFLOW: required: true - push: - branches: [ main ] jobs: deploy: @@ -35,6 +32,6 @@ jobs: - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ secrets.GITHUB_TOKEN_WORKFLOW }} publish_dir: ./docs/_build/html destination_dir: ./ diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 85e4f4d..667b901 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -25,11 +25,11 @@ jobs: uses: equinor/warmth/.github/workflows/snyk.yml@main secrets: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN_WORKFLOW: ${{ secrets.GITHUB_TOKEN }} docs: uses: equinor/warmth/.github/workflows/docs.yml@main secrets: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN_WORKFLOW: ${{ secrets.GITHUB_TOKEN }} deploy: needs: [test3d, test1d, snyk, docs] diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index 74c7082..d0883a5 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -1,11 +1,11 @@ name: Snyk scan on: - workflow_call: - secrets: - SNYK_TOKEN: - required: true - GITHUB_TOKEN: - required: true + workflow_call: + secrets: + SNYK_TOKEN: + required: true + GITHUB_TOKEN_WORKFLOW: + required: true jobs: security: runs-on: ubuntu-latest @@ -23,4 +23,4 @@ jobs: uses: github/codeql-action/upload-sarif@v2 with: sarif_file: snyk.sarif - token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + token: ${{ secrets.GITHUB_TOKEN_WORKFLOW }} \ No newline at end of file