Skip to content

Build WP Test Runner image #1280

Build WP Test Runner image

Build WP Test Runner image #1280

name: Build WP Test Runner image
on:
schedule:
- cron: '45 10 * * *'
push:
branches:
- master
paths:
- "wp-test-runner/**"
- ".github/workflows/wp-test-runner.yml"
pull_request:
branches:
- master
paths:
- "wp-test-runner/**"
- ".github/workflows/wp-test-runner.yml"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build Docker image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out the source code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: https://ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.event_name != 'pull_request' }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up Docker Metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/automattic/vip-container-images/wp-test-runner
tags: |
type=raw,value=latest
- name: Build and push
uses: docker/build-push-action@v5
with:
context: wp-test-runner
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}