Skip to content

chore: updated to build #2

chore: updated to build

chore: updated to build #2

name: Build and push multi-arch Docker image (latest)
on:
push:
tags:
- 'v*'
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set IMAGE_OWNER (lower-cased)
run: |
OWNER="${GITHUB_REPOSITORY%%/*}"
echo "IMAGE_OWNER=$(echo "$OWNER" | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: "Build and push multi-arch image (tag: latest)"
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile.daemon
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/${{ env.IMAGE_OWNER }}/kflow:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Output image
run: echo "Pushed ghcr.io/${{ env.IMAGE_OWNER }}/kflow:latest"