File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 4848 # Permission required to create a release
4949 permissions :
5050 contents : write
51+ pull-requests : write
5152
5253 env :
5354 IMAGE_ORG_BASE : quay.io/${{ github.event.inputs.quay-organization }}
55+ PR_BRANCH_NAME : adjustments-release-${{ github.event.inputs.version }}
5456
5557 steps :
5658 - uses : actions/checkout@v3
@@ -132,6 +134,25 @@ jobs:
132134 with :
133135 commit_message : Update dependency versions for release ${{ github.event.inputs.version }}
134136 file_pattern : ' README.md controllers/defaults.go *.yaml Makefile go.mod go.sum'
137+ create_branch : true
138+ branch : ${{ env.PR_BRANCH_NAME }}
139+
140+ - name : Create a PR with code changes
141+ run : |
142+ GIT_BRANCH=${GITHUB_REF#refs/heads/}
143+ gh pr create --base "$GIT_BRANCH" --fill --head "${{ env.PR_BRANCH_NAME }}" --label "lgtm" --label "approved"
144+ env :
145+ GITHUB_TOKEN : ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }}
146+
147+ - name : Wait until PR with code changes is merged
148+ run : |
149+ timeout 3600 bash -c 'until [[ $(gh pr view '${{ env.PR_BRANCH_NAME }}' --json state --jq .state) == "MERGED" ]]; do sleep 5 && echo "$(gh pr view '${{ env.PR_BRANCH_NAME }}' --json state --jq .state)"; done'
150+ env :
151+ GITHUB_TOKEN : ${{ github.TOKEN }}
152+
153+ - name : Delete remote branch
154+ run : |
155+ git push origin --delete ${{ env.PR_BRANCH_NAME }}
135156
136157 - name : Creates a release in GitHub
137158 run : |
You can’t perform that action at this time.
0 commit comments