m/cup
1
0
mirror of https://github.com/sergi0g/cup.git synced 2025-11-16 17:13:46 -05:00

Fix CI workflows

This commit is contained in:
Sergio
2025-03-03 10:18:11 +02:00
parent c4de3961a0
commit fde61ee07d
4 changed files with 69 additions and 68 deletions

51
.github/actions/build-image/action.yml vendored Normal file
View File

@@ -0,0 +1,51 @@
name: Build Image
inputs:
tags:
description: "Docker image tags"
required: true
secrets:
GITHUB_TOKEN:
required: true
runs:
using: 'composite'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download binaries
uses: actions/download-artifact@v4
with:
path: .
- 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/sergi0g/cup
tags: ${{ inputs.tags }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: sergi0g
password: $GITHUB_TOKEN
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max