Skip to content

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

Bump docker/login-action from 2 to 3

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

name: Create and publish Masscan Docker image
on:
workflow_dispatch: {}
push:
branches: [ main ]
paths:
- 'boefjes/images/masscan/Dockerfile'
- '.github/workflows/masscan_container_image.yml'
pull_request:
branches: [ main ]
paths:
- 'boefjes/images/masscan/Dockerfile'
- '.github/workflows/masscan_container_image.yml'
env:
REGISTRY: ghcr.io
jobs:
build-masscan-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
id: buildx
- 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-masscan-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: ./boefjes/images/masscan
push: true
platforms: linux/arm64,linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}