Skip to content

Commit

Permalink
Add multi-arch Docker builds to CI run
Browse files Browse the repository at this point in the history
  • Loading branch information
asgrim committed Jan 24, 2025
1 parent 7f7edca commit e734bd9
Showing 1 changed file with 27 additions and 14 deletions.
41 changes: 27 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,39 @@ jobs:
name: Build CI container
runs-on: ubuntu-latest
steps:
- name: "Install BuildX"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
with:
install: true

- name: "Build docker image"
uses: "docker/build-push-action@v6"
# @todo move after the build
- name: Build docker image (multi-arch validation)
uses: docker/build-push-action@v6
with:
target: development
tags: ghcr.io/roave/docbooktool:test-image
platforms: linux/amd64,linux/arm64
cache-from: type=gha,scope=ci-cache
cache-to: type=gha,mode=max,scope=ci-cache

- name: Build docker image
uses: docker/build-push-action@v6
with:
target: "development"
tags: "ghcr.io/roave/docbooktool:test-image"
push: "false"
load: "true"
cache-from: "type=gha,scope=ci-cache"
cache-to: "type=gha,mode=max,scope=ci-cache"
target: development
tags: ghcr.io/roave/docbooktool:test-image
push: false
load: true
cache-from: type=gha,scope=ci-cache
cache-to: type=gha,mode=max,scope=ci-cache

- name: "Psalm"
run: "docker run --rm --entrypoint=php ghcr.io/roave/docbooktool:test-image vendor/bin/psalm"
- name: Psalm
run: docker run --rm --entrypoint=php ghcr.io/roave/docbooktool:test-image vendor/bin/psalm

- name: "PHPUnit"
run: "docker run --rm --entrypoint=php ghcr.io/roave/docbooktool:test-image vendor/bin/phpunit"
- name: PHPUnit
run: docker run --rm --entrypoint=php ghcr.io/roave/docbooktool:test-image vendor/bin/phpunit

- name: "PHPCS"
run: "docker run --rm --entrypoint=php ghcr.io/roave/docbooktool:test-image vendor/bin/phpcs"
run: docker run --rm --entrypoint=php ghcr.io/roave/docbooktool:test-image vendor/bin/phpcs

0 comments on commit e734bd9

Please sign in to comment.