Skip to content

Commit afa88e7

Browse files
committed
fix: resolve detached HEAD warning in swift-format workflow
- Add ref parameter to actions/checkout to avoid detached HEAD state - Uses github.head_ref for PRs, github.ref_name for pushes - Eliminates warning from git-auto-commit-action
1 parent 166d6bc commit afa88e7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/swift-format.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
contents: write
1919
steps:
2020
- uses: actions/checkout@v5
21+
with:
22+
ref: ${{ github.head_ref || github.ref_name }}
2123

2224
- name: Cache swift-format
2325
id: cache-swift-format

0 commit comments

Comments
 (0)