Skip to content

Bump docker/login-action from 2 to 3 #86

Bump docker/login-action from 2 to 3

Bump docker/login-action from 2 to 3 #86

name: Create and publish Docker image for building Debian packages
on:
workflow_dispatch: {}
push:
branches:
- 'main'
paths:
- "packaging"
- ".github/workflows/build-debian-docker-image.yml"
pull_request:
paths:
- "packaging/**"
- ".github/workflows/build-debian-docker-image.yml"
env:
REGISTRY: ghcr.io
jobs:
build-debian-image:
strategy:
matrix:
dist: [debian11, debian12, ubuntu22.04]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@879dcbb708d40f8b8679d4f7941b938a086e23a7
with:
images: |
ghcr.io/${{ github.repository_owner }}/nl-kat-${{ matrix.dist }}-build-image
tags: |
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=raw,value=latest,enable={{is_default_branch}}
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./packaging/${{ matrix.dist }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}