Skip to content

Commit

Permalink
Workaround for broken git checkout
Browse files Browse the repository at this point in the history
This sets HEAD to a dummy commit before checking
out the tree. The checkout step will then do a git
clean which will wipe the tree before the auth step,
preventing this issue from occurring again. See
actions/checkout#590 (comment)

b/282361986
  • Loading branch information
isarkis committed May 13, 2023
1 parent 8b54d05 commit 1969e71
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/main_win.yaml
Expand Up @@ -58,6 +58,10 @@ jobs:
)
)
steps:
- name: Prepare Workspace
shell: bash
run: |
git checkout -f $(git -c user.name=x -c user.email=x@x commit-tree $(git hash-object -t tree /dev/null) < /dev/null) || :
- id: Checkout
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -102,6 +106,10 @@ jobs:
packages: write
runs-on: windows-2019
steps:
- name: Prepare Workspace
shell: bash
run: |
git checkout -f $(git -c user.name=x -c user.email=x@x commit-tree $(git hash-object -t tree /dev/null) < /dev/null) || :
- name: Checkout files
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -135,6 +143,10 @@ jobs:
include: ${{ fromJson(needs.initialize.outputs.includes) }}
config: [devel, debug, qa, gold]
steps:
- name: Prepare Workspace
shell: bash
run: |
git checkout -f $(git -c user.name=x -c user.email=x@x commit-tree $(git hash-object -t tree /dev/null) < /dev/null) || :
- name: Checkout
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -169,6 +181,10 @@ jobs:
config: [devel]
include: ${{ fromJson(needs.initialize.outputs.includes) }}
steps:
- name: Prepare Workspace
shell: bash
run: |
git checkout -f $(git -c user.name=x -c user.email=x@x commit-tree $(git hash-object -t tree /dev/null) < /dev/null) || :
- name: Checkout
uses: actions/checkout@v3
with:
Expand Down

0 comments on commit 1969e71

Please sign in to comment.