build: perform validation on all base images for PRs (#1610)

This commit is contained in:
Geoff Bourne
2022-07-20 20:24:05 -05:00
committed by GitHub
parent a0a046f9f6
commit eb22d4cadc
22 changed files with 110 additions and 108 deletions

View File

@@ -1,4 +1,4 @@
name: Build and publish multiarch
name: Test and Build multi-architecture
on:
push:
branches:
@@ -10,6 +10,13 @@ on:
- "*.md"
- "docs/**"
- "examples/**"
pull_request:
branches: [ master ]
types: [assigned, opened, synchronize, labeled]
paths-ignore:
- "*.md"
- "docs/**"
- "examples/**"
jobs:
build:
@@ -120,12 +127,6 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2.0.0
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build for test
uses: docker/build-push-action@v3.0.0
with:
@@ -149,12 +150,23 @@ jobs:
run: |
tests/test.sh
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3.0.0
with:
platforms: ${{ matrix.platforms }}
push: ${{ github.ref_type == 'tag' || github.ref_name == 'master' }}
push: >
${{
github.ref_type == 'tag'
|| github.ref_name == 'master'
|| ( github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci/push-image') )
}}
tags: ${{ steps.meta.outputs.tags }}
# ensure latest base image is used
pull: true