File tree Expand file tree Collapse file tree 3 files changed +39
-6
lines changed
Expand file tree Collapse file tree 3 files changed +39
-6
lines changed Original file line number Diff line number Diff line change 11name : Release (feature branch)
22
3- on :
4- push :
5- branches-ignore :
6- - main
7- pull_request : {}
3+ on : workflow_call
84
95jobs :
106 test :
Original file line number Diff line number Diff line change 11name : Release (latest)
22
3- on : workflow_dispatch
3+ on : workflow_call
44
55jobs :
66 test :
Original file line number Diff line number Diff line change 1+ name : Release Router
2+
3+ on :
4+ push :
5+ branches-ignore :
6+ - main
7+ pull_request :
8+ workflow_dispatch :
9+
10+ jobs :
11+ detect :
12+ runs-on : ubuntu-latest
13+ outputs :
14+ target : ${{ steps.route.outputs.target }}
15+
16+ steps :
17+ - name : Route release
18+ id : route
19+ run : |
20+ EVENT="${{ github.event_name }}"
21+ BRANCH="${GITHUB_REF##*/}"
22+
23+ if [[ "$EVENT" == "workflow_dispatch" && "$BRANCH" == "main" ]]; then
24+ echo "target=latest" >> $GITHUB_OUTPUT
25+ else
26+ echo "target=feature" >> $GITHUB_OUTPUT
27+ fi
28+
29+ run-feature :
30+ needs : detect
31+ if : needs.detect.outputs.target == 'feature'
32+ uses : ./.github/workflows/release-feature-branch.yml
33+
34+ run-latest :
35+ needs : detect
36+ if : needs.detect.outputs.target == 'latest'
37+ uses : ./.github/workflows/release-latest.yml
You can’t perform that action at this time.
0 commit comments