From ed0f4943e5728b623f41a0cad81c85293cb451b2 Mon Sep 17 00:00:00 2001 From: Ernesto Casablanca Date: Thu, 30 Nov 2023 23:18:00 +0000 Subject: [PATCH] ci: reinstate docker image on main branch --- .github/workflows/docker.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 52cedd10..7ca91b10 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -2,6 +2,8 @@ name: Docker on: push: + branches: + - master tags: - "*" @@ -33,8 +35,9 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - name: Build and push Docker image + - name: Build and push Docker image (latest) uses: docker/build-push-action@v5 + if: startsWith(github.ref, 'refs/tags/') with: context: . push: true @@ -42,3 +45,12 @@ jobs: labels: ${{ steps.meta.outputs.labels }} build-args: | VERSION=${{ github.ref_name }} + + - name: Build and push Docker image (branch) + uses: docker/build-push-action@v5 + if: startsWith(github.ref, 'refs/heads') + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}