mirror of
https://github.com/ciromattia/kcc
synced 2026-04-21 00:18:56 +00:00
* Optimized Docker image * Divided Dockerfile into two images * Fixed dockerfile path * Updated workflows * Added remaining packages in Dockerfile-base * Updated workflows
52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
name: Build and publish final image
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags:
|
|
- 'v*.*.*'
|
|
|
|
# Don't trigger if it's just a documentation update or a base image update
|
|
paths-ignore:
|
|
- '**.md'
|
|
- '**.MD'
|
|
- '**.yml'
|
|
- 'docs/**'
|
|
- 'LICENSE'
|
|
- '.gitattributes'
|
|
- '.gitignore'
|
|
- 'requirements-docker.txt'
|
|
- 'Dockerfile-base'
|
|
|
|
jobs:
|
|
build_and_publish_image:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Docker meta
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: ghcr.io/${{ github.repository_owner }}/kcc
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/kcc:final-cache
|
|
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/kcc:final-cache,mode=max
|