chore(deps): bump laravel/mcp from 0.6.7 to 0.7.0 (#255) #707
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 and Push Docker Images | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - 'docker/**' | |
| tags: | |
| - 'v*' | |
| concurrency: | |
| group: docker-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-base-image: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| tags: ${{ steps.tags.outputs.tags }} | |
| base_image_tag: ${{ steps.base_image_tag.outputs.tag }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check for base image changes | |
| uses: dorny/paths-filter@v4 | |
| id: filter | |
| with: | |
| filters: | | |
| base: | |
| - 'docker/php/**' | |
| - name: Generate Docker tags | |
| id: tags | |
| uses: ./.github/actions/docker-tags | |
| with: | |
| image: davidcrty/databasement-php | |
| - name: Set up QEMU | |
| if: steps.filter.outputs.base == 'true' | |
| uses: docker/setup-qemu-action@v4 | |
| - name: Set up Docker Buildx | |
| if: steps.filter.outputs.base == 'true' | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Login to Docker Hub | |
| if: steps.filter.outputs.base == 'true' | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ vars.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build and push base image | |
| if: steps.filter.outputs.base == 'true' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| tags: ${{ steps.tags.outputs.tags }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Determine base image tag for app build | |
| id: base_image_tag | |
| run: | | |
| if [[ "${{ steps.filter.outputs.base }}" == "true" ]]; then | |
| # Base image was rebuilt, use the first tag | |
| FIRST_TAG=$(echo '${{ steps.tags.outputs.tags }}' | head -1) | |
| echo "tag=${FIRST_TAG##*:}" >> $GITHUB_OUTPUT | |
| else | |
| # Base image not rebuilt, fall back to latest | |
| echo "tag=latest" >> $GITHUB_OUTPUT | |
| fi | |
| build-app-image: | |
| runs-on: ubuntu-latest | |
| needs: build-base-image | |
| if: always() && !failure() && !cancelled() | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ vars.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Generate Docker tags | |
| id: tags | |
| uses: ./.github/actions/docker-tags | |
| with: | |
| image: davidcrty/databasement | |
| - name: Extract version from tag | |
| id: version | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| - name: Build and push app image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| tags: ${{ steps.tags.outputs.tags }} | |
| build-args: | | |
| APP_COMMIT_HASH=${{ github.sha }} | |
| APP_VERSION=${{ steps.version.outputs.version }} | |
| BASE_IMAGE=davidcrty/databasement-php:${{ needs.build-base-image.outputs.base_image_tag }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |