Skip to content

Bump docker/build-push-action from 6 to 7 #219

Bump docker/build-push-action from 6 to 7

Bump docker/build-push-action from 6 to 7 #219

Workflow file for this run

name: Docker Build
on:
schedule:
# run every Friday at 01:31
- cron: '31 01 * * 5'
# run on every push to any branch
push:
branches-ignore:
- dependabot/*
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# Login against DockerHub registry except on PR
- name: Log in to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.PETERS_DOCKERHUB_USERNAME }}
password: ${{ secrets.PETERS_DOCKERHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
stadlerpeter/digilib-docker
flavor: |
latest=${{ github.ref == 'refs/heads/main' }}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@v7
with:
context: .
platforms: |
linux/amd64
linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}