Skip to content

Commit

Permalink
Exclude amd64 platform also on testing
Browse files Browse the repository at this point in the history
  • Loading branch information
en-jschuetze authored Jan 15, 2025
1 parent 1914fae commit 79b27b3
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Download amd64 artifact
if: env.EXCLUDED_PLATFORM != 'linux/amd64'
uses: actions/download-artifact@v4
with:
name: linux-amd64.tar
Expand All @@ -277,14 +278,19 @@ jobs:
docker load --input /tmp/linux-amd64.tar
docker image ls -a
- name: Test amd64
if: env.EXCLUDED_PLATFORM != 'linux/amd64'
run: |
docker run --platform linux/amd64 --rm temporary-build-image-linux-amd64 sh -c 'uname -a && php -v'
- name: Test arm64
if: env.EXCLUDED_PLATFORM != 'linux/arm64'
run: |
docker run --platform linux/arm64 --rm temporary-build-image-linux-arm64 sh -c 'uname -a && php -v'
- name: "PHP_VERSION Env"
- name: "PHP_VERSION Env amd64"
if: env.EXCLUDED_PLATFORM != 'linux/amd64'
run: echo "PHP_VERSION=`docker run --pull=never --rm -t temporary-build-image-linux-amd64 php --version | head -n 1 | cut -f 2 -d ' '``docker run --pull=never --rm -t temporary-build-image-linux-amd64 php --version | grep 'ZTS' >/dev/null && echo '-zts' || echo ''`" >> $GITHUB_ENV
- name: "PHP_VERSION Env arm64"
if: env.EXCLUDED_PLATFORM != 'linux/arm64'
run: echo "PHP_VERSION=`docker run --pull=never --rm -t temporary-build-image-linux-arm64 php --version | head -n 1 | cut -f 2 -d ' '``docker run --pull=never --rm -t temporary-build-image-linux-arm64 php --version | grep 'ZTS' >/dev/null && echo '-zts' || echo ''`" >> $GITHUB_ENV
- name: Log into registry ${{ env.GITHUB_REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/[email protected]
Expand All @@ -305,7 +311,11 @@ jobs:
if [ "${{ env.EXCLUDED_PLATFORM }}" = "linux/arm64" ]; then
echo "PLATFORMS=linux/amd64" >> $GITHUB_ENV
else
echo "PLATFORMS=linux/amd64,linux/arm64" >> $GITHUB_ENV
if [ "${{ env.EXCLUDED_PLATFORM }}" = "linux/amd64" ]; then
echo "PLATFORMS=linux/arm64" >> $GITHUB_ENV
else
echo "PLATFORMS=linux/amd64,linux/arm64" >> $GITHUB_ENV
fi
fi
- if: contains(matrix.suffix, 'unsuffixed')
name: Build and push Docker image
Expand Down

0 comments on commit 79b27b3

Please sign in to comment.