Add a nightly docker tag built whenever there's a push to main

This commit is contained in:
Herculino Trotta
2025-01-28 23:13:23 -03:00
committed by GitHub
parent fa931b0db2
commit 80fdf70f7d

View File

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