2
0
forked from jmug/cactoide

fix: github action issues

This commit is contained in:
Levente Orban
2025-08-27 13:46:36 +02:00
parent 079ca76272
commit a9fe0817b0

View File

@@ -19,28 +19,38 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up QEMU (for multi-arch)
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Log in to Container Registry - name: Normalize image name to lowercase
run: echo "IMAGE_NAME_LC=${IMAGE_NAME,,}" >> $GITHUB_ENV
env:
IMAGE_NAME: ${{ env.IMAGE_NAME }}
- name: Log in to GHCR
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: ${{ env.REGISTRY }} registry: ${{ env.REGISTRY }}
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
context: . context: .
file: ./Dockerfile file: ./Dockerfile
push: ${{ github.event_name != 'pull_request' }} push: true
cache-from: type=gha
tags: latest
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LC }}:latest
labels: |
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
- name: Output image info - name: Output image info
if: github.event_name != 'pull_request'
run: | run: |
echo "Image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}" echo "Image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LC }}:latest"