refactor: release type workflows

This commit is contained in:
PassiveLemon 2025-06-18 16:53:51 -04:00
parent b1824a66a3
commit 68f9fccf3a

View File

@ -2,7 +2,7 @@ name: Build and push Docker image
on: on:
release: release:
types: [ published ] types: [ released, prereleased ]
jobs: jobs:
setup-build-push: setup-build-push:
@ -34,7 +34,8 @@ jobs:
cp -lr $GITHUB_WORKSPACE/src/ $GITHUB_WORKSPACE/docker/ cp -lr $GITHUB_WORKSPACE/src/ $GITHUB_WORKSPACE/docker/
cp -lr $GITHUB_WORKSPACE/example/ $GITHUB_WORKSPACE/docker/ cp -lr $GITHUB_WORKSPACE/example/ $GITHUB_WORKSPACE/docker/
- name: Build and push Docker image - name: Build and push Docker image (Release)
if: "!github.event.release.prerelease"
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
context: ./docker context: ./docker
@ -46,3 +47,15 @@ jobs:
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max
- name: Build and push Docker image (Prerelease)
if: "github.event.release.prerelease"
uses: docker/build-push-action@v6
with:
context: ./docker
push: true
platforms: linux/amd64,linux/arm64
tags: |
zoraxydocker/zoraxy:${{ github.event.release.tag_name }}
cache-from: type=gha
cache-to: type=gha,mode=max