Build PHP Base Image #122
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 Base Image | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| schedule: | |
| - cron: "0 0 * * *" | |
| jobs: | |
| build_docker_images: | |
| # Job name that shows in the GitHub UI | |
| name: 'Build Docker Images' | |
| # Runner to use | |
| runs-on: ubuntu-latest | |
| # Permissions for the job | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| steps: | |
| - name: 'Checkout' | |
| uses: actions/checkout@v4 | |
| - name: 'Login to DockerHub Container Registry' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: 'Login to GitHub Container Registry' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: 'Set up QEMU' | |
| uses: docker/setup-qemu-action@v3 | |
| - name: 'Set up Docker Buildx' | |
| uses: docker/setup-buildx-action@v3 | |
| - name: 'Build and push Docker image' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| platforms: linux/arm64, linux/amd64 | |
| push: true | |
| tags: | | |
| monkeysoft/php:latest-apache | |
| ghcr.io/monkeysoftnl/docker-php:latest-apache |