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
|
cancel-in-progress: false
|
||||||
|
|
||||||
jobs:
|
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:
|
ci:
|
||||||
|
needs: check-secrets
|
||||||
|
if: needs.check-secrets.outputs.ready == 'true'
|
||||||
uses: ./.github/workflows/plugin-ci.yaml
|
uses: ./.github/workflows/plugin-ci.yaml
|
||||||
with:
|
with:
|
||||||
node-version: ${{ inputs.node-version }}
|
node-version: ${{ inputs.node-version }}
|
||||||
|
|
||||||
check-tag:
|
check-tag:
|
||||||
|
needs: check-secrets
|
||||||
|
if: needs.check-secrets.outputs.ready == 'true'
|
||||||
runs-on: runners-privilegedescalation
|
runs-on: runners-privilegedescalation
|
||||||
outputs:
|
outputs:
|
||||||
skip: ${{ steps.check.outputs.skip }}
|
skip: ${{ steps.check.outputs.skip }}
|
||||||
@@ -58,8 +79,8 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs: [ci, check-tag]
|
needs: [ci, check-tag, check-secrets]
|
||||||
if: needs.check-tag.outputs.skip != 'true'
|
if: needs.check-secrets.outputs.ready == 'true' && needs.check-tag.outputs.skip != 'true'
|
||||||
runs-on: runners-privilegedescalation
|
runs-on: runners-privilegedescalation
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user