Don't run Danger for forks as secrets are missing.

Simplify the check for the alpha release to reduce number of jobs.
This commit is contained in:
Doug
2022-08-03 12:11:29 +01:00
committed by Doug
parent a3d2fc40ae
commit 087b25b6ab
2 changed files with 4 additions and 14 deletions
+2
View File
@@ -4,6 +4,8 @@ on: [pull_request]
jobs:
build:
# Don't run for forks as secrets are unavailable.
if: github.repository == 'vector-im/element-x-ios'
runs-on: ubuntu-latest
name: Danger
steps:
+2 -14
View File
@@ -9,21 +9,9 @@ on:
workflow_dispatch:
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_PASSWORD }}
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]
if: needs.check-secret.outputs.out-key == 'true'
# Don't run for forks as secrets are unavailable.
if: github.repository == 'vector-im/element-x-ios'
name: Release
runs-on: macos-12