feat: install ext-intl #5
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: CI | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
REGISTRY: ghcr.io | |
PLATFORM: linux/amd64,linux/arm64 | |
jobs: | |
build: | |
name: Build Php ${{ matrix.php_version }} container | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
attestations: write | |
id-token: write | |
strategy: | |
matrix: | |
php_version: | |
- 8.2 | |
- 8.3 | |
- 8.4 | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
platforms: ${{ env.PLATFORM }} | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
- uses: actions/checkout@v4 | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/${{ github.repository }} | |
labels: | | |
org.opencontainers.image.title="php-devcontainer" | |
org.opencontainers.image.vendor="act coding GbR" | |
org.opencontainers.image.version="${{ matrix.php_version }}" | |
tags: | | |
type=raw,${{ matrix.php_version }} | |
flavor: | | |
latest=false | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
id: push | |
with: | |
context: src | |
file: src/Dockerfile | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
push: ${{ github.event_name != 'pull_request' }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
platforms: ${{ env.PLATFORM }} | |
build-args: | | |
PHP_VERSION=${{ matrix.php_version }} | |
- name: Generate artifact attestation | |
uses: actions/attest-build-provenance@v2 | |
if: github.event_name != 'pull_request' | |
with: | |
subject-name: ${{ env.REGISTRY }}/${{ github.repository }} | |
subject-digest: ${{ steps.push.outputs.digest }} | |
push-to-registry: true |