Build PHP 8.1 #11
This file contains hidden or 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 PHP 8.1 | ||
# Configures this workflow to run every time a release is created. | ||
on: | ||
workflow_dispatch: | ||
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds. | ||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. | ||
permissions: | ||
contents: read | ||
packages: write | ||
attestations: write | ||
id-token: write | ||
strategy: | ||
matrix: | ||
variant: | ||
- platform: 'linux/amd64,linux/arm64' | ||
image: 8.1-cli-alpine3.21 | ||
tags: | | ||
Check failure on line 28 in .github/workflows/php81.yml
|
||
${{ env.REGISTRY }}/${{ github.repository_owner }}/php-grpc:8.1-cli | ||
- platform: 'linux/amd64,linux/arm64' | ||
image: 8.1-zts-alpine3.21 | ||
tags: | | ||
${{ env.REGISTRY }}/${{ github.repository_owner }}/php-grpc:8.1-zts | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push PHP 8.1 | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ./ | ||
file: ./Dockerfile | ||
push: true | ||
platforms: ${{ matrix.variant.platform }} | ||
build-args: | | ||
PHP_IMAGE=${{ matrix.variant.image }} | ||
tags: ${{ matrix.variant.tags }} | ||
build_xdebug: | ||
runs-on: ubuntu-latest | ||
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. | ||
permissions: | ||
contents: read | ||
packages: write | ||
attestations: write | ||
id-token: write | ||
strategy: | ||
matrix: | ||
variant: | ||
- platform: 'linux/amd64,linux/arm64' | ||
image: 8.1-cli-alpine3.21 | ||
tags: | | ||
${{ env.REGISTRY }}/${{ github.repository_owner }}/php-grpc:8.1-cli-xdebug | ||
- platform: 'linux/amd64,linux/arm64' | ||
image: 8.1-zts-alpine3.21 | ||
tags: | | ||
${{ env.REGISTRY }}/${{ github.repository_owner }}/php-grpc:8.1-zts-xdebug | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push PHP 8.1 with Xdebug | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ./ | ||
file: ./Dockerfile | ||
push: true | ||
platforms: ${{ matrix.variant.platform }} | ||
build-args: | | ||
PHP_IMAGE=${{ matrix.variant.image }} | ||
XDEBUG_ENABLED=true | ||
tags: ${{ matrix.variant.tags }} |