mirror of
https://github.com/Damillora/phoebe.git
synced 2025-03-10 05:57:22 +00:00
chore: release binaries alongside docker images now
This commit is contained in:
parent
51453a8e93
commit
f62e3d3b7c
52
.github/workflows/workflow.yml
vendored
52
.github/workflows/workflow.yml
vendored
@ -3,10 +3,26 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
|
env:
|
||||||
|
IS_RELEASE: ${{ startsWith(github.ref, 'refs/tags/') && 'true' || 'false' }}
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
platform: [linux/amd64,linux/arm64]
|
||||||
|
env:
|
||||||
|
IS_LINUX: ${{ startsWith(matrix.platform, 'linux/') && 'true' || 'false' }}
|
||||||
|
GIT_TAG: ${{ needs.git-version.outputs.git_tag }}
|
||||||
steps:
|
steps:
|
||||||
|
-
|
||||||
|
name: Sanitize platform name
|
||||||
|
id: set-platform
|
||||||
|
run: |
|
||||||
|
PLATFORM=$(echo ${{ matrix.platform }} | tr '/' '_')
|
||||||
|
echo "PLATFORM=$PLATFORM" >> $GITHUB_ENV
|
||||||
-
|
-
|
||||||
name: Set up QEMU
|
name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v1
|
||||||
@ -20,13 +36,39 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
-
|
-
|
||||||
name: Build and push
|
name: Build Binaries
|
||||||
id: docker_build
|
id: docker_build
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: ${{ matrix.platform }}
|
||||||
tags: damillora/shioriko:latest
|
outputs: |
|
||||||
|
type=local,dest=./output/${{ env.PLATFORM }}
|
||||||
|
-
|
||||||
|
name: Upload Binaries
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: shioriko-${{ env.PLATFORM }}
|
||||||
|
path: ./output
|
||||||
|
retention-days: 7
|
||||||
|
-
|
||||||
|
name: Build and push (No tag)
|
||||||
|
if: env.IS_LINUX == 'true' && env.IS_RELEASE == 'false'
|
||||||
|
id: docker_build
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
platforms: ${{ matrix.platform }}
|
||||||
|
tags: damillora/shioriko:main
|
||||||
|
-
|
||||||
|
name: Build and push (Tagged)
|
||||||
|
if: env.IS_LINUX == 'true' && env.IS_RELEASE == 'true'
|
||||||
|
id: docker_build
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
platforms: ${{ matrix.platform }}
|
||||||
|
tags: damillora/shioriko:${{ env.GIT_TAG }}
|
||||||
-
|
-
|
||||||
name: Image digest
|
name: Image digest
|
||||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user