fix(ci): docker build, use --ssh instead of -v

This commit is contained in:
rudy
2023-01-04 14:45:31 +01:00
committed by rudy-6-4
parent 7bcb3377fa
commit 5797d73683
2 changed files with 6 additions and 8 deletions

View File

@@ -689,16 +689,11 @@ jobs:
- name: Login to Registry
run: echo "${{ secrets.GHCR_PASSWORD }}" | docker login -u ${{ secrets.GHCR_LOGIN }} --password-stdin ghcr.io
- name: Set up ssh auth in docker
run: |
echo "SSH_AUTH_SOCK_DIR=$(dirname $SSH_AUTH_SOCK)" >> "${GITHUB_ENV}"
# label was initially a need from the frontend CI
- name: Build Image
run: |
docker image build --no-cache \
-v ${{ env.SSH_AUTH_SOCK }}:/ssh.socket \
-e SSH_AUTH_SOCK=/ssh.socket \
DOCKER_BUILDKIT=1 docker build --no-cache \
--ssh default=${{ env.SSH_AUTH_SOCK }} \
--label "commit-sha=${{ github.sha }}" -t ${{ matrix.image }} -f ${{ matrix.dockerfile }} .
- name: Tag and Publish Image