Skip to content

Commit 38df4b8

Browse files
Ensure we're not in a detached state when committing (#304)
When running this workflow for the first time, we got the following output: ``` fatal: You are not currently on a branch. To push the history leading to the current (detached HEAD) state now, use git push origin HEAD:<name-of-remote-branch> ``` By specifying the ref on checkout, we should be in a valid state and be able to push.
1 parent 5be20e3 commit 38df4b8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/compile-dependabot-updates.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
uses: actions/checkout@v4
1616
with:
1717
persist-credentials: false
18+
ref: ${{ github.event.pull_request.head.ref }}
1819

1920
- name: Set up Node
2021
uses: actions/setup-node@v4
@@ -48,6 +49,7 @@ jobs:
4849
token: ${{ secrets.GITHUB_TOKEN }}
4950
fetch-depth: 0
5051
persist-credentials: false
52+
ref: ${{ github.event.pull_request.head.ref }}
5153

5254
- name: Download build artifacts
5355
uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)