diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 36ea07d4..e5add43e 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -1,31 +1,8 @@ name: Docker Build on: - pull_request: - branches: - - main - paths: - - '.github/workflows/docker-build.yml' - - 'backend/**' - - 'frontend/**' - - 'shared/**' - - 'Dockerfile' - - 'scripts/**' - push: - branches: - - main - paths: - - 'backend/**' - - 'frontend/**' - - 'shared/**' - - 'Dockerfile' - - 'scripts/**' - tags: - - 'v*' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + release: + types: [published] permissions: contents: read @@ -44,13 +21,10 @@ jobs: with: images: ghcr.io/${{ github.repository }} tags: | - type=ref,event=pr,prefix=pr- - type=edge,branch=main - type=sha,prefix=commit-,format=short,enable={{is_default_branch}} type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} - type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }} + type=raw,value=latest - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -70,8 +44,9 @@ jobs: with: context: . platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} + push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max + target: runner