Skip to content

Commit

Permalink
Support build arm64 for dev images.
Browse files Browse the repository at this point in the history
  • Loading branch information
limingxinleo committed Jun 17, 2024
1 parent ae216f9 commit 225888c
Showing 1 changed file with 33 additions and 5 deletions.
38 changes: 33 additions & 5 deletions .github/workflows/build-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,38 @@ jobs:
default => substr($phpVersion, 0, 1)
};
echo "::set-output name=version::" . $version . PHP_EOL;
- name: Build
run: export PHP_BUILD_VERSION=${{ steps.fetch-php-build-version.outputs.version }} && docker-compose build alpine-dev
- name: Login
run: docker login --username limingxinleo -p ${{ secrets.DOCKERHUB_ACCESSTOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: limingxinleo
password: ${{ secrets.DOCKERHUB_ACCESSTOKEN }}
- name: Build and export to Docker
uses: docker/build-push-action@v5
with:
context: ${{ matrix.php-version }}/alpine/dev
load: true
tags: hyperf/hyperf:${{ matrix.php-version }}-alpine-v${{ matrix.alpine-version }}-dev
build-args: |
"ALPINE_VERSION=${{ matrix.alpine-version }}"
"COMPOSER_VERSION=${{ env.COMPOSER_VERSION }}"
"PHP_BUILD_VERSION=${{ steps.fetch-php-build-version.outputs.version }}"
- name: Check
run: |
docker run --entrypoint php hyperf/hyperf:${{ matrix.php-version }}-alpine-v${{ matrix.alpine-version }}-dev -v
- name: Push
run: docker push hyperf/hyperf:${PHP_VERSION}-alpine-v${{ matrix.alpine-version }}-dev
if: ${{ github.ref == 'refs/heads/build' }}
uses: docker/build-push-action@v5
with:
context: ${{ matrix.php-version }}/alpine/dev
push: true
platforms: linux/amd64,linux/arm64
tags: hyperf/hyperf:${{ matrix.php-version }}-alpine-v${{ matrix.alpine-version }}-dev
build-args: |
"ALPINE_VERSION=${{ matrix.alpine-version }}"
"COMPOSER_VERSION=${{ env.COMPOSER_VERSION }}"
"PHP_BUILD_VERSION=${{ steps.fetch-php-build-version.outputs.version }}"

0 comments on commit 225888c

Please sign in to comment.