2021-05-10 22:47:35 +07:00
|
|
|
name: CI
|
2021-05-11 00:39:52 +07:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2021-05-10 22:47:35 +07:00
|
|
|
jobs:
|
2025-02-23 19:16:29 +00:00
|
|
|
build:
|
2021-05-10 22:47:35 +07:00
|
|
|
runs-on: ubuntu-latest
|
2025-02-23 19:16:29 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
platform: [linux/amd64,linux/arm64]
|
|
|
|
env:
|
|
|
|
IS_LINUX: ${{ startsWith(matrix.platform, 'linux/') && 'true' || 'false' }}
|
|
|
|
GIT_TAG: ${{ needs.git-version.outputs.git_tag }}
|
2021-05-10 22:47:35 +07:00
|
|
|
steps:
|
2025-02-23 19:16:29 +00:00
|
|
|
-
|
|
|
|
name: Sanitize platform name
|
2025-02-23 19:18:55 +00:00
|
|
|
id: set_platform
|
2025-02-23 19:16:29 +00:00
|
|
|
run: |
|
|
|
|
PLATFORM=$(echo ${{ matrix.platform }} | tr '/' '_')
|
|
|
|
echo "PLATFORM=$PLATFORM" >> $GITHUB_ENV
|
2021-05-10 22:47:35 +07:00
|
|
|
-
|
|
|
|
name: Set up QEMU
|
2025-02-23 19:27:28 +00:00
|
|
|
uses: docker/setup-qemu-action@v3
|
2021-05-10 22:47:35 +07:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2025-02-23 19:27:28 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2021-05-10 22:47:35 +07:00
|
|
|
-
|
|
|
|
name: Login to DockerHub
|
2025-02-23 19:27:28 +00:00
|
|
|
uses: docker/login-action@v3
|
2021-05-10 22:47:35 +07:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
-
|
2025-02-24 15:06:40 +00:00
|
|
|
name: Build and push
|
2025-02-23 19:18:55 +00:00
|
|
|
id: docker_build_git
|
2025-02-23 19:16:29 +00:00
|
|
|
uses: docker/build-push-action@v6
|
|
|
|
with:
|
|
|
|
push: true
|
|
|
|
platforms: ${{ matrix.platform }}
|
2025-02-24 13:50:43 +00:00
|
|
|
tags: damillora/phoebe:main
|
2021-05-10 22:47:35 +07:00
|
|
|
-
|
|
|
|
name: Image digest
|
|
|
|
run: echo ${{ steps.docker_build.outputs.digest }}
|