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: .