fix(ci): block release on failed validator chain
This commit is contained in:
@@ -19,11 +19,23 @@ concurrency:
|
|||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
upstream-gate:
|
||||||
|
name: Upstream Success Gate
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Fail Fast on Failed Validator Chain
|
||||||
|
run: |
|
||||||
|
if [ "${{ github.event_name }}" = "workflow_run" ] && [ "${{ github.event.workflow_run.conclusion }}" != "success" ]; then
|
||||||
|
echo "ERROR: Validators workflow did not succeed; release preparation is blocked."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
build-and-release:
|
build-and-release:
|
||||||
name: Build & Create Release
|
name: Build & Create Release
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
|
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
|
needs: upstream-gate
|
||||||
outputs:
|
outputs:
|
||||||
version: ${{ steps.metadata.outputs.version }}
|
version: ${{ steps.metadata.outputs.version }}
|
||||||
commit: ${{ steps.metadata.outputs.commit }}
|
commit: ${{ steps.metadata.outputs.commit }}
|
||||||
@@ -199,7 +211,7 @@ jobs:
|
|||||||
name: Release Notification
|
name: Release Notification
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: always()
|
if: always()
|
||||||
needs: build-and-release
|
needs: [upstream-gate, build-and-release]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Notify Release Ready
|
- name: Notify Release Ready
|
||||||
|
|||||||
Reference in New Issue
Block a user