Skip to content

Commit

Permalink
[CI] Work around submodule permissions error in container
Browse files Browse the repository at this point in the history
Part of OpenAssetIO/OpenAssetIO#1351. A recent change to git has
exposed a bug in actions/checkout

Signed-off-by: David Feltell <[email protected]>
  • Loading branch information
feltech committed Aug 15, 2024
1 parent fd03da7 commit 280fc67
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,17 @@ jobs:
steps:
- uses: actions/checkout@v4

# TODO(DF): Remove once fixed upstream. Checkout in a container
# doesn't use the container's user (appears to use 1001 rather
# than root 0) and safe.directory setting is not applied properly.
# So submodule update fails.
# https://github.com/actions/checkout/issues/1169
# The check itself was added to git in
# https://github.com/git/git/commit/f4aa8c8bb11dae6e769cd930565173808cbb69c8
- name: Work around actions/checkout ownership bug
run: |
git config --system --add safe.directory $(pwd)
- name: Get OpenAssetIO-MediaCreation
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -107,6 +118,17 @@ jobs:
steps:
- uses: actions/checkout@v4

# TODO(DF): Remove once fixed upstream. Checkout in a container
# doesn't use the container's user (appears to use 1001 rather
# than root 0) and safe.directory setting is not applied properly.
# So submodule update fails.
# https://github.com/actions/checkout/issues/1169
# The check itself was added to git in
# https://github.com/git/git/commit/f4aa8c8bb11dae6e769cd930565173808cbb69c8
- name: Work around actions/checkout ownership bug
run: |
git config --system --add safe.directory $(pwd)
- name: Get OpenAssetIO
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -141,6 +163,17 @@ jobs:
steps:
- uses: actions/checkout@v4

# TODO(DF): Remove once fixed upstream. Checkout in a container
# doesn't use the container's user (appears to use 1001 rather
# than root 0) and safe.directory setting is not applied properly.
# So submodule update fails.
# https://github.com/actions/checkout/issues/1169
# The check itself was added to git in
# https://github.com/git/git/commit/f4aa8c8bb11dae6e769cd930565173808cbb69c8
- name: Work around actions/checkout ownership bug
run: |
git config --system --add safe.directory $(pwd)
- name: Install Traitgen
run: |
python -m pip install git+https://github.com/OpenAssetIO/OpenAssetIO-TraitGen
Expand Down

0 comments on commit 280fc67

Please sign in to comment.