feat: add GHCR container images (#383)

This commit is contained in:
Zoe Roux 2024-04-06 16:01:54 +02:00 committed by GitHub
commit 55ddbf72d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,6 +12,9 @@ on:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
@ -60,7 +63,9 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{matrix.image}}
images: |
docker.io/${{matrix.image}}
ghcr.io/${{matrix.image}}
tags: |
type=edge
type=ref,event=branch
@ -85,6 +90,14 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GitHub Container Registry
if: env.SHOULD_PUSH == 'true'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5