Skip to content

Commit b5e4d4c

Browse files
authored
Merge pull request #826 from armsnyder/fix-ee-forks
Workflows: Fix issue where forks would still run EE tests
2 parents 420a806 + 3eaab8a commit b5e4d4c

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/workflows/pr-acceptance.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,19 @@ jobs:
3838
- id: go-version
3939
run: echo "::set-output name=go-version::$(cat .go-version)"
4040

41+
# Check whether the LICENSE_ENCRYPTION_PASSWORD secret exists.
42+
# Workaround for https://github.com/actions/runner/issues/520.
43+
license-encryption-password:
44+
runs-on: ubuntu-latest
45+
outputs:
46+
defined: ${{ steps.defined.outputs.defined }}
47+
steps:
48+
- id: defined
49+
env:
50+
LICENSE_ENCRYPTION_PASSWORD: ${{ secrets.LICENSE_ENCRYPTION_PASSWORD }}
51+
if: ${{ env.LICENSE_ENCRYPTION_PASSWORD != '' }}
52+
run: echo "::set-output name=defined::true"
53+
4154
acceptance-ce:
4255
timeout-minutes: 60
4356
runs-on: ubuntu-latest
@@ -61,9 +74,12 @@ jobs:
6174
- run: make testacc
6275

6376
acceptance-ee:
77+
# Only run EE tests if the LICENSE_ENCRYPTION_PASSWORD secret exists, so that the workflow
78+
# doesn't fail when code is pushed to a fork.
79+
if: ${{ needs.license-encryption-password.outputs.defined }}
6480
timeout-minutes: 60
6581
runs-on: ubuntu-latest
66-
needs: [go-version]
82+
needs: [go-version, license-encryption-password]
6783
steps:
6884
- uses: actions/setup-go@v2
6985
with:

0 commit comments

Comments
 (0)