File tree 1 file changed +24
-0
lines changed
1 file changed +24
-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,28 @@ 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 }}"
144
+ PR_NUMBER=$(gh pr view ${{ env.PR_BRANCH_NAME }} --json number --jq .number)
145
+ gh pr comment $PR_NUMBER --body "/lgtm"
146
+ gh pr comment $PR_NUMBER --body "/approve"
147
+ env :
148
+ GITHUB_TOKEN : ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }}
149
+
150
+ - name : Wait until PR with code changes is merged
151
+ run : |
152
+ 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'
153
+ env :
154
+ GITHUB_TOKEN : ${{ github.TOKEN }}
155
+
156
+ - name : Delete remote branch
157
+ run : |
158
+ git push origin --delete ${{ env.PR_BRANCH_NAME }}
135
159
136
160
- name : Creates a release in GitHub
137
161
run : |
You can’t perform that action at this time.
0 commit comments