From 80fdf70f7d9bb61ec243d4028d93b54d6e04d797 Mon Sep 17 00:00:00 2001 From: Herculino Trotta Date: Tue, 28 Jan 2025 23:13:23 -0300 Subject: [PATCH] Add a nightly docker tag built whenever there's a push to main --- .github/workflows/release.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 95a0cc5..915cf54 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,10 @@ name: Release Pipeline on: release: types: [created] + push: + branches: [ main ] + pull_request: + branches: [ main ] env: IMAGE_NAME: wygiwyh @@ -29,7 +33,21 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Build and push image + - name: Build and push nightly image + if: github.event_name == 'push' || github.event_name == 'pull_request' + uses: docker/build-push-action@v6 + with: + context: . + file: ./docker/prod/django/Dockerfile + push: true + provenance: false + tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:nightly + platforms: linux/amd64,linux/arm64 + cache-from: type=gha + cache-to: type=gha,mode=max + + - name: Build and push release image + if: github.event_name == 'release' uses: docker/build-push-action@v6 with: context: .