Skip to content

ci(tools): update docker/build-push-action action to v6 #256

ci(tools): update docker/build-push-action action to v6

ci(tools): update docker/build-push-action action to v6 #256

Workflow file for this run

---
name: docker
"on":
pull_request:
branches:
- master
push:
branches:
- master
tags:
- v*
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout source
id: source
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,enable=true,event=branch
type=ref,enable=true,event=tag
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
labels: |
org.opencontainers.image.vendor=Webhippie
maintainer=Thomas Boerger <thomas@webhippie.de>
- name: Setup QEMU
id: qemu
uses: docker/setup-qemu-action@v3
- name: Setup Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Docker login
id: login
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker build
id: docker
uses: docker/build-push-action@v6
with:
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64
provenance: false
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
- name: Update version
id: version
uses: nowactions/update-majorver@v1
if: startsWith(github.ref, 'refs/tags/v')
...