Merge pull request #38 from privilegedescalation/fix/release-skip-missing-secrets
fix: skip release gracefully when RELEASE_APP_ID is not configured
This commit is contained in:
@@ -34,12 +34,33 @@ concurrency:
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
check-secrets:
|
||||
runs-on: runners-privilegedescalation
|
||||
outputs:
|
||||
ready: ${{ steps.check.outputs.ready }}
|
||||
steps:
|
||||
- name: Verify RELEASE_APP_ID is configured
|
||||
id: check
|
||||
env:
|
||||
RELEASE_APP_ID: ${{ secrets.RELEASE_APP_ID }}
|
||||
run: |
|
||||
if [ -z "$RELEASE_APP_ID" ]; then
|
||||
echo "::notice::RELEASE_APP_ID org secret is not configured (see PRI-380). Release skipped — no artifacts will be created."
|
||||
echo "ready=false" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "ready=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
ci:
|
||||
needs: check-secrets
|
||||
if: needs.check-secrets.outputs.ready == 'true'
|
||||
uses: ./.github/workflows/plugin-ci.yaml
|
||||
with:
|
||||
node-version: ${{ inputs.node-version }}
|
||||
|
||||
check-tag:
|
||||
needs: check-secrets
|
||||
if: needs.check-secrets.outputs.ready == 'true'
|
||||
runs-on: runners-privilegedescalation
|
||||
outputs:
|
||||
skip: ${{ steps.check.outputs.skip }}
|
||||
@@ -58,8 +79,8 @@ jobs:
|
||||
fi
|
||||
|
||||
release:
|
||||
needs: [ci, check-tag]
|
||||
if: needs.check-tag.outputs.skip != 'true'
|
||||
needs: [ci, check-tag, check-secrets]
|
||||
if: needs.check-secrets.outputs.ready == 'true' && needs.check-tag.outputs.skip != 'true'
|
||||
runs-on: runners-privilegedescalation
|
||||
timeout-minutes: 10
|
||||
|
||||
|
||||
Reference in New Issue
Block a user