Skip to content

build(deps): Bump docker/build-push-action from 5 to 6 #31

build(deps): Bump docker/build-push-action from 5 to 6

build(deps): Bump docker/build-push-action from 5 to 6 #31

name: "Publish test utils image"
on:
push:
paths:
- 'tests/Dockerfile.utils'
- '.github/workflows/publish-test-utils-image.yaml'
branches:
- main
pull_request:
paths:
- 'tests/Dockerfile.utils'
- '.github/workflows/publish-test-utils-image.yaml'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test-utils:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}/test-utils
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to GitHub Package Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: tests/
file: tests/Dockerfile.utils
platforms: linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
push: ${{ github.event_name == 'push' }}
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache