|
| 1 | +# NOTE: This file was generated via generate.sh. Don't edit it directly |
| 2 | + |
| 3 | +name: 'PHP 7.4' |
| 4 | + |
| 5 | +on: |
| 6 | + pull_request: |
| 7 | + paths: |
| 8 | + - 7.4/** |
| 9 | + push: |
| 10 | + paths: |
| 11 | + - 7.4/** |
| 12 | + |
| 13 | +defaults: |
| 14 | + run: |
| 15 | + shell: 'bash -Eeuo pipefail -x {0}' |
| 16 | + |
| 17 | +jobs: |
| 18 | + verify-templating: |
| 19 | + name: Verify templating |
| 20 | + runs-on: ubuntu-latest |
| 21 | + steps: |
| 22 | + - uses: actions/checkout@v3 |
| 23 | + - name: Generate |
| 24 | + run: make all |
| 25 | + - name: Check Git status |
| 26 | + run: | |
| 27 | + test -z "$(git status --short)" |
| 28 | +
|
| 29 | + docker: |
| 30 | + name: ${{ matrix.target }} |
| 31 | + runs-on: ubuntu-latest |
| 32 | + needs: |
| 33 | + - verify-templating |
| 34 | + strategy: |
| 35 | + matrix: |
| 36 | + target: |
| 37 | + [ |
| 38 | + "7_4_33-cli-alpine3_16", |
| 39 | + "7_4_33-fpm-alpine3_16", |
| 40 | + "7_4_33-nginx-alpine3_16", |
| 41 | + ] |
| 42 | + env: |
| 43 | + DOCKER_HUB_PUSH: ${{ (secrets.DOCKER_HUB_USERNAME && secrets.DOCKER_HUB_TOKEN) && 'true' || 'false' }} |
| 44 | + steps: |
| 45 | + - name: Checkout |
| 46 | + uses: actions/checkout@v3 |
| 47 | + - name: Set up QEMU |
| 48 | + uses: docker/setup-qemu-action@v2 |
| 49 | + with: |
| 50 | + platforms: arm,arm64 |
| 51 | + - name: Set up buildx |
| 52 | + uses: docker/setup-buildx-action@v2 |
| 53 | + - name: Login to Docker Hub |
| 54 | + uses: docker/login-action@v2 |
| 55 | + with: |
| 56 | + username: ${{ secrets.DOCKER_HUB_USERNAME }} |
| 57 | + password: ${{ secrets.DOCKER_HUB_TOKEN }} |
| 58 | + if: ${{ env.DOCKER_HUB_PUSH == 'true' }} |
| 59 | + - name: Login to GitHub Container Registry |
| 60 | + uses: docker/login-action@v2 |
| 61 | + with: |
| 62 | + registry: ghcr.io |
| 63 | + username: ${{ github.repository_owner }} |
| 64 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 65 | + - name: Build and push to GitHub Container Registry |
| 66 | + uses: docker/bake-action@v2 |
| 67 | + env: |
| 68 | + REGISTRY: ghcr.io |
| 69 | + REPO: ${{ github.repository_owner }}/php |
| 70 | + with: |
| 71 | + targets: ${{ matrix.target }} |
| 72 | + set: | |
| 73 | + *.platform=linux/amd64,linux/arm,linux/arm64 |
| 74 | + push: ${{ github.event_name == 'push' }} |
| 75 | + - name: Build and push to DockerHub |
| 76 | + uses: docker/bake-action@v2 |
| 77 | + with: |
| 78 | + targets: ${{ matrix.target }} |
| 79 | + set: | |
| 80 | + *.platform=linux/amd64,linux/arm,linux/arm64 |
| 81 | + push: ${{ github.event_name == 'push' }} |
| 82 | + if: ${{ env.DOCKER_HUB_PUSH == 'true' }} |
0 commit comments