Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaffter committed Mar 18, 2024
1 parent 4ec32ba commit 2bdc110
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/sonar-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,16 @@ jobs:
# against.
fetch-depth: 0

- name: Switch from the detached HEAD of the merge commit to a new branch
- name: Check if the HEAD is detached
# Buildx does not work on a detached HEAD
id: is_head_detached
run: |
# return exit code 1 if the head is detached
git symbolic-ref -q HEAD > /dev/null 2>&1
echo "detached=$?" >> "$GITHUB_OUTPUT"
- name: Switch from the detached HEAD of the merge commit to a new branch
if: ${{ steps.is_head_detached.outputs.detached }}
run: git switch -c new-branch

- name: Derive appropriate SHAs for base and head for `nx affected` commands
Expand Down

0 comments on commit 2bdc110

Please sign in to comment.