Skip to content

Bump docker/build-push-action from 5 to 6 #20

Bump docker/build-push-action from 5 to 6

Bump docker/build-push-action from 5 to 6 #20

Workflow file for this run

---
name: Code tests
on:
- push
- pull_request
jobs:
changed-files:
name: Detect changed files
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
ci: ${{ steps.changes.outputs.ci }}
composer: ${{ steps.changes.outputs.composer }}
php: ${{ steps.changes.outputs.php }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check for file changes
uses: dorny/paths-filter@v3
id: changes
with:
filters: .github/file-filters.yml
composer-validation:
if: needs.changed-files.outputs.composer == 'true'
needs:
- changed-files
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate composer.json and composer.lock
run: composer validate --strict
tests:
if: needs.changed-files.outputs.php == 'true'
needs:
- changed-files
runs-on: ubuntu-latest
strategy:
matrix:
php-versions:
- '8.1'
- '8.2'
- '8.3'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: xml
- name: Run syntax check
run: ./scripts/cibuild.sh
docker-build:
if: |
github.ref == 'refs/heads/main' && github.event_name != 'pull_request' &&
needs.changed-files.outputs.composer == 'true' && needs.changed-files.outputs.php == 'true'
needs:
- composer-validation
- changed-files
- tests
runs-on: ubuntu-latest
steps:
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ github.repository }}:bleeding-edge
cache-from: type=gha
cache-to: type=gha,mode=max