File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626 description : ' Integration branch to promote'
2727 required : true
2828 default : develop
29- type : string
29+ type : choice
30+ options :
31+ - develop
3032 base_branch :
3133 description : ' Release branch that receives the promotion PR'
3234 required : true
3335 default : main
34- type : string
36+ type : choice
37+ options :
38+ - main
3539 enable_auto_merge :
3640 description : ' Enable auto-merge for the promotion PR after checks pass'
3741 required : true
5256 name : Open promotion PR
5357 runs-on : ubuntu-latest
5458 env :
55- GH_TOKEN : ${{ secrets.RELEASE_AUTOMATION_TOKEN || github.token }}
59+ GH_TOKEN : ${{ github.token }}
5660 BASE_BRANCH : ${{ inputs.base_branch }}
5761 HEAD_BRANCH : ${{ inputs.head_branch }}
5862 steps :
Original file line number Diff line number Diff line change @@ -42,11 +42,22 @@ jobs:
4242 tag_name : ${{ steps.release.outputs.tag_name }}
4343 version : ${{ steps.release.outputs.version }}
4444 steps :
45+ - name : Verify release automation token
46+ env :
47+ RELEASE_AUTOMATION_TOKEN : ${{ secrets.RELEASE_AUTOMATION_TOKEN }}
48+ run : |
49+ if [[ -z "${RELEASE_AUTOMATION_TOKEN}" ]]; then
50+ echo "RELEASE_AUTOMATION_TOKEN is required for release automation." >&2
51+ echo "Use a repository-scoped GitHub App token or fine-grained PAT." >&2
52+ echo "The token must create release tags that trigger downstream workflows." >&2
53+ exit 1
54+ fi
55+
4556 - name : Run release-please
4657 id : release
47- uses : googleapis/release-please-action@v4
58+ uses : googleapis/release-please-action@8b8fd2cc23b2e18957157a9d923d75aa0c6f6ad5 # v4
4859 with :
49- token : ${{ secrets.RELEASE_AUTOMATION_TOKEN || github.token }}
60+ token : ${{ secrets.RELEASE_AUTOMATION_TOKEN }}
5061 target-branch : main
5162 release-type : simple
5263
5970 echo "- Tag: \`${{ steps.release.outputs.tag_name || 'not created' }}\`"
6071 echo "- Version: \`${{ steps.release.outputs.version || 'not created' }}\`"
6172 echo
62- echo "Use a repository secret named \`RELEASE_AUTOMATION_TOKEN\` from a"
63- echo "GitHub App or fine-grained PAT if tag or release events must"
64- echo "trigger downstream workflows."
73+ echo "\`RELEASE_AUTOMATION_TOKEN\` is required so release-created tags"
74+ echo "can trigger downstream Docker image and bundle workflows."
6575 } >> "${GITHUB_STEP_SUMMARY}"
You can’t perform that action at this time.
0 commit comments