Skip to content

Commit 280fc67

Browse files
committed
[CI] Work around submodule permissions error in container
Part of OpenAssetIO/OpenAssetIO#1351. A recent change to git has exposed a bug in actions/checkout Signed-off-by: David Feltell <[email protected]>
1 parent fd03da7 commit 280fc67

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/test.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,17 @@ jobs:
7474
steps:
7575
- uses: actions/checkout@v4
7676

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

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

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

0 commit comments

Comments
 (0)