Skip to content

Commit c70035d

Browse files
committed
actions: pass UID and GID to PR builds of dockerfiles
1 parent a2d2769 commit c70035d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/main.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,11 @@ jobs:
241241
working-directory: ${{ env.docker-config-path }}
242242
if: matrix.platform.container.name != ''
243243
- name: Create container
244-
run: docker build -t ${{ env.docker-registry-container-sha }} -f ${{ env.dockerfile }} .
244+
run: |
245+
if [ "${{ matrix.container.base }}" != "" ]; then
246+
BASE_ARG="--build-arg BASE=${{ matrix.container.base }}"
247+
fi
248+
docker build -t ${{ env.docker-registry-container-sha }} --build-arg UID=$(id -u) --build-arg GID=$(id -g) ${BASE_ARG} -f ${{ env.dockerfile }} .
245249
working-directory: ${{ env.docker-config-path }}
246250
if: matrix.platform.container.name != '' && env.docker-container-exists != 'true'
247251
- name: Build and test

0 commit comments

Comments
 (0)