mirror of
https://github.com/ciromattia/kcc
synced 2026-04-17 22:48:53 +00:00
* Optimized Docker image * Divided Dockerfile into two images * Fixed dockerfile path * Updated workflows * Added remaining packages in Dockerfile-base * Updated workflows
46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
name: Build and Publish Base Docker Image
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
paths:
|
|
- 'requirements-docker.txt'
|
|
- 'Dockerfile-base'
|
|
|
|
jobs:
|
|
build_and_publish_base_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: Set Release Date
|
|
id: release_date
|
|
run: |
|
|
echo "release_date=$(date --rfc-3339=date)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
|
file: Dockerfile-base
|
|
push: true
|
|
tags: |
|
|
ghcr.io/${{ github.repository_owner }}/kcc:base-latest
|
|
ghcr.io/${{ github.repository_owner }}/kcc:base-${{ steps.release_date.outputs.release_date }}
|
|
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/kcc:base-cache
|
|
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/kcc:base-cache,mode=max
|