Fix Element Alpha workflow

set-output is deprecated and the warning fails the secret check. Instead match ElementX by comparing the pull request repo to make sure it matches the workflow's repo.
This commit is contained in:
Doug
2023-01-10 16:37:48 +00:00
committed by Doug
parent 47bf2dcbcd
commit 09cc9b78bc
2 changed files with 3 additions and 14 deletions
+2 -14
View File
@@ -13,22 +13,10 @@ env:
MX_GIT_BRANCH: ${{ github.event.pull_request.head.ref }}
jobs:
check-secret:
runs-on: macos-12
outputs:
out-key: ${{ steps.out-key.outputs.defined }}
steps:
- id: out-key
env:
P12_KEY: ${{ secrets.ALPHA_CERTIFICATES_P12 }}
P12_PASSWORD_KEY: ${{ secrets.ALPHA_CERTIFICATES_P12 }}
if: "${{ env.P12_KEY != '' || env.P12_PASSWORD_KEY != '' }}"
run: echo "::set-output name=defined::true"
build:
# Run job if secrets are available (not available for forks).
needs: [check-secret]
# Don't run for forks as secrets are unavailable.
if: |
needs.check-secret.outputs.out-key == 'true' &&
github.event.pull_request.head.repo.full_name == github.repository &&
(github.event_name == 'push' ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'Trigger-PR-Build')))