File tree 1 file changed +21
-0
lines changed
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 48
48
# Permission required to create a release
49
49
permissions :
50
50
contents : write
51
+ pull-requests : write
51
52
52
53
env :
53
54
IMAGE_ORG_BASE : quay.io/${{ github.event.inputs.quay-organization }}
55
+ PR_BRANCH_NAME : adjustments-release-${{ github.event.inputs.version }}
54
56
55
57
steps :
56
58
- uses : actions/checkout@v3
@@ -132,6 +134,25 @@ jobs:
132
134
with :
133
135
commit_message : Update dependency versions for release ${{ github.event.inputs.version }}
134
136
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 }}
135
156
136
157
- name : Creates a release in GitHub
137
158
run : |
You can’t perform that action at this time.
0 commit comments