Build the PHP 7.2 Apache2 container #720
This file contains 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 the PHP 7.2 Apache2 container | |
on: | |
push: | |
paths: | |
- "php72-apache2/**" | |
- ".github/workflows/build-php72-apache2.yaml" | |
schedule: | |
- cron: '0 7 * * *' | |
workflow_dispatch: | |
jobs: | |
build-push-php72: | |
runs-on: "ubuntu-22.04" | |
permissions: | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
context: ./php72-apache2 | |
platforms: "linux/amd64,linux/arm64" | |
# only push the latest tag on the main branch | |
push: "${{ github.ref == 'refs/heads/main' }}" | |
tags: | | |
ghcr.io/openconext/openconext-basecontainers/php72-apache2:latest | |
ghcr.io/openconext/openconext-basecontainers/php72-apache2:${{ github.sha }} | |
cache-from: type=gha | |
cache-to: type=gha |