Skip to content

Commit 75f60f2

Browse files
committed
wip
1 parent f7def2f commit 75f60f2

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

.github/workflows/update-swift-version.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99

1010
jobs:
1111
update-swift-version:
12+
name: Create or update PR
1213
runs-on: ubuntu-latest
1314

1415
permissions:
@@ -55,10 +56,6 @@ jobs:
5556
latest=$(swiftly list-available main-snapshot | grep main-snapshot | head -n 1 | awk '{print $1}')
5657
echo -n "$latest" > .swift-version
5758
echo "version=$latest" >> "$GITHUB_OUTPUT"
58-
if [[ -z "$(git status --porcelain .swift-version)" ]]; then
59-
echo "No changes. Exiting."
60-
exit 0 # neutral exit status
61-
fi
6259
6360
git add .swift-version
6461
git commit -m "Update Swift version to $latest"
@@ -68,7 +65,7 @@ jobs:
6865
pr=$(gh pr list --head ci/update-swift-version --state open --json number --jq '.[0].number')
6966
7067
title="ci: update Swift version to $latest"
71-
body="This PR updates the \`.swift-version\` file to Swift $latest.
68+
body="Updates the \`.swift-version\` file to Swift `$latest`.
7269
7370
> This PR was automatically generated."
7471
@@ -83,7 +80,7 @@ jobs:
8380
gh pr edit --title "$title" --body "$body"
8481
fi
8582
86-
gh pr merge --auto --squash
83+
gh pr merge --auto --squash --subject "$title" --body "$body"
8784
8885
env:
89-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
86+
GH_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)