mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-06-21 15:03:05 +02:00
refactor: release type workflows
This commit is contained in:
parent
b1824a66a3
commit
68f9fccf3a
17
.github/workflows/docker.yml
vendored
17
.github/workflows/docker.yml
vendored
@ -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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user