bugfix: move external-tools integration testing into container build … #223
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and push containers | |
on: | |
release: | |
types: [published] | |
pull_request: | |
jobs: | |
release-container: | |
runs-on: ubuntu-latest | |
env: | |
DOCKER_USER: ${{ secrets.CONTAINER_USERNAME }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
install: true | |
- name: Login to GitHub Container Registry | |
if: ${{ github.event_name == 'release' }} | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker meta | |
id: docker_meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ghcr.io/laminas/laminas-continuous-integration | |
tags: | | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{major}} | |
type=ref,event=branch | |
type=ref,event=pr | |
flavor: | | |
latest=false | |
- name: Build image. Push for release | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./Dockerfile | |
pull: true | |
push: false | |
tags: | | |
${{ steps.docker_meta.outputs.tags }} | |
labels: ${{ steps.docker_meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: "roave/backward-compatibility-check" | |
uses: external-tools-integration-test | |
run: | | |
docker run -it --entrypoint=/bin/bash ${{ steps.docker_meta.outputs.tags[0] }} -c roave-backward-compatibility-check --version | |
- name: "staabm/annotate-pull-request-from-checkstyle" | |
run: | | |
docker run -it --entrypoint=/bin/bash ${{ steps.docker_meta.outputs.tags[0] }} -c cs2pr | |
- name: Build image. Push for release | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./Dockerfile | |
pull: true | |
push: ${{ github.event_name == 'release' }} | |
tags: | | |
${{ steps.docker_meta.outputs.tags }} | |
labels: ${{ steps.docker_meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |