File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 1414 - cron : ' 0 0 * * *'
1515 workflow_dispatch :
1616
17+ env :
18+ BUILD_LABEL : " run release build"
19+
1720jobs :
21+ check-pr-labels :
22+ name : check PR labels
23+ runs-on : ubuntu-latest
24+ outputs :
25+ run_release_workflow : ${{ steps.gen_output.outputs.apt_tools }}
26+ steps :
27+ - if : ${{ github.event_name == 'pull_request' }}
28+ run : |
29+ echo run_release_workflow="$(if gh api --jq '.labels.[].name' /repos/${{ github.repository }}/pulls/${{ github.event.number }} | grep --quiet '^${{ env.BUILD_LABEL }}$' ; then echo "yes" ; else echo "no" ; fi)" >> "$GITHUB_OUTPUT"
30+
31+ - if : ${{ github.event_name != 'pull_request' }}
32+ run : |
33+ echo run_release_workflow="yes" >> "$GITHUB_OUTPUT"
34+
1835 release-workflow :
36+ needs : ["check-pr-labels"]
37+ if : ${{ needs.check-pr-labels.outputs.run_release_workflow == 'yes' }}
1938 uses : ./.github/workflows/reusable-release.yml
2039 with :
2140 branches : ' ["${{ github.ref }}"]'
You can’t perform that action at this time.
0 commit comments