File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed
Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -130,12 +130,17 @@ jobs:
130130 git push -f origin "origin/main:${SIGSTORE_PIN_REQUIREMENTS_BRANCH}"
131131
132132 - name : Open pull request
133- uses : peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # v7.0.9
134- with :
135- title : |
136- Update pinned requirements for ${{ env.SIGSTORE_RELEASE_TAG }}
137- body : |
138- Pins dependencies for <https://github.com/sigstore/sigstore-python/releases/tag/${{ env.SIGSTORE_RELEASE_TAG }}>.
139- base : main
140- branch : ${{ env.SIGSTORE_PIN_REQUIREMENTS_BRANCH }}
141- delete-branch : true
133+ env :
134+ GH_TOKEN : ${{ github.token }}
135+ run : |
136+ # Try to create a new PR, or update if it already exists
137+ if ! gh pr create \
138+ --title "Update pinned requirements for ${SIGSTORE_RELEASE_TAG}" \
139+ --body "Pins dependencies for <https://github.com/sigstore/sigstore-python/releases/tag/${SIGSTORE_RELEASE_TAG}>." \
140+ --base main \
141+ --head "${SIGSTORE_PIN_REQUIREMENTS_BRANCH}"; then
142+ # PR already exists, update it
143+ gh pr edit "${SIGSTORE_PIN_REQUIREMENTS_BRANCH}" \
144+ --title "Update pinned requirements for ${SIGSTORE_RELEASE_TAG}" \
145+ --body "Pins dependencies for <https://github.com/sigstore/sigstore-python/releases/tag/${SIGSTORE_RELEASE_TAG}>."
146+ fi
You can’t perform that action at this time.
0 commit comments