mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 16:24:11 +00:00
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:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user