Merge pull request #38 from bmeme/37_update_docker_images_at_php_late… #14
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: Release Bmeme PHP container images | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| env: | |
| registry: docker.io | |
| repository: bmeme/php | |
| jobs: | |
| configure: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - | |
| name: Checkout to repository | |
| uses: actions/checkout@v3 | |
| - | |
| name: Set matrix data | |
| id: set-matrix | |
| run: echo "matrix=$(jq -c . < ./config.json)" >> $GITHUB_OUTPUT | |
| build: | |
| name: Build and push Bmeme PHP container images using Docker | |
| runs-on: ubuntu-latest | |
| needs: configure | |
| strategy: | |
| matrix: ${{ fromJson(needs.configure.outputs.matrix) }} | |
| steps: | |
| - | |
| name: Check out the codebase. | |
| uses: actions/checkout@v3 | |
| - | |
| name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - | |
| name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - | |
| name: Build images with base tags | |
| id: build-base | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ${{ matrix.php_pretty_version }}/${{ matrix.os_version }}/${{ matrix.php_type }}/Dockerfile | |
| push: true | |
| platforms: "linux/amd64, linux/arm64" | |
| tags: | | |
| ${{ env.registry }}/${{ env.repository }}:${{ matrix.name }} | |
| ${{ env.registry }}/${{ env.repository }}:${{ matrix.php_pretty_version }}-${{ matrix.php_type }}-${{ matrix.os_version }} | |
| - | |
| name: Build latest image | |
| id: build-latest | |
| if: ${{ matrix.latest }} | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ${{ matrix.php_pretty_version }}/${{ matrix.os_version }}/${{ matrix.php_type }}/Dockerfile | |
| push: true | |
| platforms: "linux/amd64, linux/arm64" | |
| tags: | | |
| ${{ env.registry }}/${{ env.repository }}:latest |