Skip to content

Run PHP 8.4 and 8.5 checks in pinned official containers #348

Run PHP 8.4 and 8.5 checks in pinned official containers

Run PHP 8.4 and 8.5 checks in pinned official containers #348

name: devcontainer image pull request
on:
pull_request:
branches: [main]
paths:
- .devcontainer/**
- .github/workflows/devcontainer-image.yml
- .github/workflows/devcontainer-image-pr.yml
- playground/**
- polyglot/qualified-artifact-tuple.json
- app/Console/Commands/Init.php
- composer.json
- composer.lock
- docker/**
- microservice/composer.json
- microservice/composer.lock
- package.json
- package-lock.json
- scripts/ci/qualify-devcontainer-image.sh
- scripts/playground
- scripts/resolve-current-artifacts.sh
permissions:
contents: read
concurrency:
group: devcontainer-image-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
qualify:
name: Qualify candidate ${{ matrix.platform }}
runs-on: ${{ matrix.runner }}
timeout-minutes: ${{ matrix.timeout_minutes }}
strategy:
fail-fast: false
matrix:
include:
- platform: linux/amd64
runner: ubuntu-24.04
timeout_minutes: 20
- platform: linux/arm64
runner: ubuntu-24.04-arm
timeout_minutes: 30
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Check out the accepted central APT preflight
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: durable-workflow/.github
ref: 18783be6bef737cc778e4c7282a8797e39daa61a
path: .central-apt-source
persist-credentials: false
- name: Verify the central APT source identity
run: |
test "$(git -C .central-apt-source rev-parse HEAD)" = 18783be6bef737cc778e4c7282a8797e39daa61a
echo '2a36a2417e8947357ea6f6cbc2f6c53a834f3c069f8013a34d6d861b7123d576 .central-apt-source/docker/apt/require-fixed-bookworm-apt.sh' | sha256sum --check --strict
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4
- name: Build untrusted candidate without a shared cache
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7
with:
context: .
file: .devcontainer/docker/Dockerfile
platforms: ${{ matrix.platform }}
load: true
no-cache: true
pull: true
push: false
tags: sample-app-devcontainer:candidate
build-args: VCS_REF=${{ github.sha }}
- name: Qualify Codespaces startup
env:
DEVCONTAINER_EXPECTED_REVISION: ${{ github.sha }}
DEVCONTAINER_REQUIRE_PUBLISHED_ATTESTATIONS: '0'
DEVCONTAINER_SKIP_IMAGE_PULL: '1'
run: >-
scripts/ci/qualify-devcontainer-image.sh
sample-app-devcontainer:candidate
"${{ matrix.platform }}"
validate:
name: Validate candidate image
if: always()
needs: [qualify]
runs-on: ubuntu-24.04
timeout-minutes: 2
steps:
- name: Require both native candidate qualifications
env:
QUALIFICATION_RESULT: ${{ needs.qualify.result }}
run: test "$QUALIFICATION_RESULT" = success