Skip to content

Commit 424059e

Browse files
committed
fix: .github: self.yml: Same branch checkout
Use switch to detach head, to avoid failure if current checkout branch has the same name. Signed-off-by: Jorge Marques <jorge.marques@analog.com>
1 parent 7883147 commit 424059e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows.mirror/self.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ jobs:
1515

1616
- name: update-self
1717
run: |
18+
git switch -d
1819
git fetch origin ${{ inputs.ci_branch }} --depth=1
1920
git fetch origin cron:cron -f
20-
git checkout cron
21+
git switch cron
2122
git rm .github/workflows -r
2223
git checkout origin/${{ inputs.ci_branch }} -- .github/workflows.mirror
2324
git mv .github/workflows.mirror .github/workflows

0 commit comments

Comments
 (0)