From 54167cec72d7e727618262ab8ba72d0bdcdb8b9f Mon Sep 17 00:00:00 2001 From: Shaun Lawrie Date: Mon, 8 Jan 2024 11:22:13 +1300 Subject: [PATCH] Add github token to deploy pipeline --- .github/workflows/build-test-publish.yml | 4 ++++ .github/workflows/unit-test-only.yml | 1 + 2 files changed, 5 insertions(+) diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index 683d64fc..1143cf26 100644 --- a/.github/workflows/build-test-publish.yml +++ b/.github/workflows/build-test-publish.yml @@ -20,6 +20,8 @@ jobs: uses: actions/checkout@v3 - name: Version Bump shell: pwsh + env: + GH_TOKEN: ${{ github.token }} run: | $ErrorActionPreference = "Stop" & .\PwshSpectreConsole\Build.ps1 @@ -54,6 +56,8 @@ jobs: uses: actions/checkout@v3 - name: Version Bump and Publish shell: pwsh + env: + GH_TOKEN: ${{ github.token }} run: | $ErrorActionPreference = "Stop" & ./PwshSpectreConsole/Build.ps1 diff --git a/.github/workflows/unit-test-only.yml b/.github/workflows/unit-test-only.yml index c0f2d9ad..5fc73f39 100644 --- a/.github/workflows/unit-test-only.yml +++ b/.github/workflows/unit-test-only.yml @@ -9,6 +9,7 @@ jobs: unit-test: name: Unit Test runs-on: ubuntu-latest + if: github.repository_owner != 'ShaunLawrie' || !(github.ref == 'refs/heads/main' && github.ref == 'refs/heads/prerelease') steps: - name: Check out repository code uses: actions/checkout@v3