Skip to content

Commit 87027cc

Browse files
committed
Normalize UID/GID
And delete incremental files. Without this uploading artifacts fails with permission issues.
1 parent a0d1db7 commit 87027cc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/ci_linux.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ jobs:
109109
- name: Pull build image
110110
run: docker pull ${{ matrix.variance.image }}
111111

112+
- name: Record host UID/GID
113+
run: |
114+
echo "HOST_UID=$(id -u)" >> $GITHUB_ENV
115+
echo "HOST_GID=$(id -g)" >> $GITHUB_ENV
116+
112117
- name: Set container name
113118
run: echo "CONTAINER_NAME=ci-build-${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.variance.runner }}" >> $GITHUB_ENV
114119

@@ -178,6 +183,11 @@ jobs:
178183
--exclude "cust_raw"
179184
'
180185
186+
- name: Normalize build artifacts ownership
187+
run: |
188+
docker exec "$CONTAINER_NAME" bash -lc "rm -rf /workspace/target/debug/incremental || true"
189+
docker exec "$CONTAINER_NAME" bash -lc "chown -R ${HOST_UID}:${HOST_GID} /workspace/target || true"
190+
181191
- name: Stop build container
182192
run: |
183193
docker rm -f "$CONTAINER_NAME" || true

0 commit comments

Comments
 (0)