From b03631e9abf048697896cb00e3a813a996f7a013 Mon Sep 17 00:00:00 2001 From: matatonic Date: Thu, 10 Oct 2024 17:03:56 -0400 Subject: [PATCH] fix very broken github builds. 2. --- .github/workflows/build-docker.yml | 41 ++++++++---------------------- 1 file changed, 11 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 3f44f1a..316929d 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -55,23 +55,15 @@ jobs: with: images: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }} - # Build and push the Docker image to GHCR for the main branch or specific tags - - name: Build and Push Docker Image - if: github.ref == 'refs/heads/main' - uses: docker/build-push-action@v4 - with: - context: . - file: Dockerfile - push: true - tags: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:latest - labels: version=${{ github.run_id }} - # Build and push the Docker image to GHCR for the main branch or specific tags - name: Build and Push Docker Image (dev) if: github.ref == 'refs/heads/dev' uses: docker/build-push-action@v4 with: context: . + build-args: | + GROUP_ID=1000 + USER_ID=1000 file: Dockerfile push: true tags: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:dev @@ -83,9 +75,14 @@ jobs: uses: docker/build-push-action@v4 with: context: . + build-args: | + GROUP_ID=1000 + USER_ID=1000 file: Dockerfile push: true - tags: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} + tags: | + ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} + ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:latest labels: version=${{ github.run_id }} build-and-push-alt-image: @@ -140,6 +137,7 @@ jobs: with: context: . build-args: | + VERSION=alt GROUP_ID=1000 USER_ID=1000 file: Dockerfile @@ -154,6 +152,7 @@ jobs: with: context: . build-args: | + VERSION=alt GROUP_ID=1000 USER_ID=1000 file: Dockerfile @@ -162,21 +161,3 @@ jobs: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:latest labels: version=${{ github.run_id }} - - # For tagged releases, build and push the Docker image with the corresponding tag - - name: Build and Push Docker Image (Tagged) - if: startsWith(github.ref, 'refs/tags/') - uses: docker/build-push-action@v4 - with: - context: . - build-args: | - VERSION=alt - GROUP_ID=1000 - USER_ID=1000 - file: Dockerfile - push: true - tags: | - ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}-alt:${{ github.ref_name }} - ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}-alt:latest - labels: version=${{ github.run_id }} -