|
| 1 | +name: Docker Image CI for ARM |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: '**' |
| 6 | + tags: '**' |
| 7 | + schedule: |
| 8 | + - cron: 0 0 * * 6 |
| 9 | + |
| 10 | +jobs: |
| 11 | + build: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + strategy: |
| 14 | + matrix: |
| 15 | + # "5.6", "7.0", "7.1", "7.2", "7.3", |
| 16 | + php_version: ["7.4", "8.0", "8.1", "8.2", "8.3", "8.4"] |
| 17 | + continue-on-error: true |
| 18 | + steps: |
| 19 | + - name: Checkout |
| 20 | + uses: actions/checkout@v4 |
| 21 | + |
| 22 | + - name: Docker meta |
| 23 | + id: meta |
| 24 | + uses: docker/metadata-action@v5 |
| 25 | + with: |
| 26 | + images: |
| 27 | + laradock/php-fpm |
| 28 | + flavor: | |
| 29 | + suffix=-${{ matrix.php_version }} |
| 30 | + tags: | |
| 31 | + type=schedule,pattern={{date 'YYYYMMDD'}} |
| 32 | + type=ref,event=branch |
| 33 | + type=semver,pattern={{version}} |
| 34 | + type=raw,value=latest |
| 35 | +
|
| 36 | + - name: Set up QEMU |
| 37 | + uses: docker/setup-qemu-action@v3 |
| 38 | + |
| 39 | + - name: Set up Docker Buildx |
| 40 | + uses: docker/setup-buildx-action@v3 |
| 41 | + |
| 42 | + - name: Login to Docker Hub |
| 43 | + if: ${{ (github.repository == 'laradock/php-fpm') && (github.ref == 'refs/heads/master') }} |
| 44 | + uses: docker/login-action@v2 |
| 45 | + with: |
| 46 | + username: ${{ secrets.DOCKER_HUB_USER }} |
| 47 | + password: ${{ secrets.DOCKER_HUB_PASSWORD }} |
| 48 | + |
| 49 | + - name: Build and push |
| 50 | + uses: docker/build-push-action@v5 |
| 51 | + with: |
| 52 | + file: Dockerfile-${{ matrix.php_version }} |
| 53 | + # platforms: linux/amd64, linux/386, linux/arm64, linux/arm/v7, linux/arm/v6 |
| 54 | + platforms: linux/arm64 |
| 55 | + push: ${{ (github.event_name != 'pull_request') && (github.repository == 'laradock/php-fpm') && (github.ref == 'refs/heads/master') }} |
| 56 | + tags: ${{ steps.meta.outputs.tags }} |
0 commit comments