Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Branch workflow protection #27

Open
wants to merge 13 commits into
base: my-protected
Choose a base branch
from
13 changes: 13 additions & 0 deletions .github/workflows/nested-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: nested matrix
env:
BATCH_SIZE: 2
on:
pull_request:
branches: [ my-protected ]

workflow_dispatch:

jobs:
Expand Down Expand Up @@ -36,6 +39,7 @@ jobs:
# set output for the job
echo "batch_matrix=[ $cluster_array_json ]" >> $GITHUB_OUTPUT


build:
runs-on: ubuntu-latest
needs: [generate-matrix]
Expand All @@ -54,3 +58,12 @@ jobs:
echo $c
done

nested-wf-done:
if: ${{ failure() }}
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Check previous job status
run: |
echo "previous job failed"
exit 11