Skip to content

chore(deps): bump docker/setup-buildx-action from 3.11.1 to 3.12.0 (#… #87

chore(deps): bump docker/setup-buildx-action from 3.11.1 to 3.12.0 (#…

chore(deps): bump docker/setup-buildx-action from 3.11.1 to 3.12.0 (#… #87

---
# yamllint disable rule:comments
# yamllint disable rule:truthy
name: Docker image [pre-commit]
on:
push:
branches:
- main
tags:
- v*
paths:
- .docker/pre-commit/**
- .github/workflows/build-pre-commit.yml
pull_request:
types:
- opened
- synchronize
- reopened
branches:
- main
- renovatebot
paths:
- .docker/pre-commit/**
- .github/workflows/build-pre-commit.yml
env:
PLATFORMS: linux/amd64
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-pre-commit
jobs:
build-and-push-image:
name: Build and push Docker image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
with:
platforms: ${{ env.PLATFORMS }}
- name: Log in to the Container registry
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image [pre-commit]
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
context: .
file: .docker/pre-commit/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: ${{ env.PLATFORMS }}
push: ${{ github.event_name != 'pull_request' }}
cache-from: type=gha
cache-to: type=gha,mode=max