Build Image for testing purposes (amd64 only) #59
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 Image for testing purposes (amd64 only)" | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- master | |
env: | |
# we only test if a build passes on amd64 (faster) | |
PLATFORMS: linux/amd64 | |
jobs: | |
build_test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout Sourcecode" | |
uses: actions/checkout@v3 | |
- name: "Check permissions" | |
run: | | |
id | |
pwd | |
ls -la | |
- name: "Set up Docker Buildx" | |
id: builder | |
uses: docker/setup-buildx-action@v2 | |
- name: "Docker build only (fpm image)" | |
uses: docker/build-push-action@v4 | |
with: | |
tags: "test" | |
platforms: ${{ env.PLATFORMS }} | |
push: false | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
target: test | |
build-args: | | |
PHP_MINOR_VERSION=${{ matrix.php-version }} | |
- name: "Test docker" | |
run: | | |
docker run -ti --rm --entrypoint "bash" test -c "ls -la /home" |