File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 APP_NAME : Resolver
1010
1111jobs :
12+ verify :
13+ name : Verify tag is on production
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Checkout git repo
17+ uses : actions/checkout@v4
18+ with :
19+ fetch-depth : 0
20+
21+ - name : Verify tag is on production branch
22+ run : |
23+ BRANCHES=$(git branch -r --contains ${{ github.ref }})
24+ if ! echo "$BRANCHES" | grep -q "origin/production"; then
25+ echo "Error: Tag must be on production branch"
26+ echo "Tag is on: $BRANCHES"
27+ exit 1
28+ fi
29+
1230 build :
13- # Ensure the tag is on the production branch
14- if : contains(github.event.base_ref, 'production')
31+ needs : verify # Only run if verify passes
1532 name : Build ${{ matrix.os }}-${{ matrix.arch }}
1633 runs-on : ${{ matrix.runner }}
1734 strategy :
4562 steps :
4663 - name : Checkout git repo
4764 uses : actions/checkout@v4
48- with :
49- fetch-depth : 0 # Need full history to check branch
50-
51- - name : Verify tag is on correct branch
52- run : |
53- BRANCHES=$(git branch -r --contains ${{ github.ref }})
54- if ! echo "$BRANCHES" | grep -q "origin/production"; then
55- echo "Error: Tag must be on production branch"
56- echo "Tag is on: $BRANCHES"
57- exit 1
58- fi
5965
6066 - name : Setup .NET
6167 uses : actions/setup-dotnet@v4
You can’t perform that action at this time.
0 commit comments