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
uses: actions/checkout@v4
- name: Set up QEMU (for multi-arch)
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
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
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.TOKEN }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: ${{ github.event_name != 'pull_request' }}
cache-from: type=gha
tags: latest
cache-to: type=gha,mode=max
push: true
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
if: github.event_name != 'pull_request'
run: |
echo "Image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"
echo "Image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LC }}:latest"