Skip to content

Commit

Permalink
Fix Element Alpha workflow
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pixlwave committed Jan 10, 2023
1 parent fb046b2 commit ac25912
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions .github/workflows/release-alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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')))
Expand Down

0 comments on commit ac25912

Please sign in to comment.