ci: Clean up old release PR before creating a new one
This commit is contained in:
parent
c8a68fa727
commit
ea2907fb9b
1 changed files with 8 additions and 0 deletions
8
.github/workflows/release-plz.yml
vendored
8
.github/workflows/release-plz.yml
vendored
|
@ -21,6 +21,14 @@ jobs:
|
||||||
toolchain: nightly
|
toolchain: nightly
|
||||||
override: true
|
override: true
|
||||||
profile: minimal
|
profile: minimal
|
||||||
|
- name: Close old release PR
|
||||||
|
run: |
|
||||||
|
# List all opened PRs which head branch starts with "release-plz-"
|
||||||
|
release_pr=$(gh pr list --state='open' --json number,headRefName --jq '.[] | select(.headRefName | startswith("release-plz-")) | .number')
|
||||||
|
# Close the release PR if there is one
|
||||||
|
if [[ -n "release_pr" ]]; then
|
||||||
|
gh pr close $release_pr
|
||||||
|
fi
|
||||||
- name: Run release-plz
|
- name: Run release-plz
|
||||||
uses: MarcoIeni/release-plz-action@v0.5
|
uses: MarcoIeni/release-plz-action@v0.5
|
||||||
env:
|
env:
|
||||||
|
|
Loading…
Add table
Reference in a new issue