This repository was archived by the owner on Sep 11, 2025. It is now read-only.
Build #524
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 | |
| on: | |
| schedule: | |
| - cron: '5 0 * * *' | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - Dockerfile.php | |
| env: | |
| DOCKER_BUILDKIT: 1 | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| jobs: | |
| image-proxy: | |
| name: Build image proxy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login into Github Docker Registery | |
| run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
| - name: Build and push | |
| uses: docker/bake-action@v5 | |
| with: | |
| push: true | |
| targets: image-proxy | |
| base-slim: | |
| name: "Build Base Slim" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: | |
| - 8-2 | |
| - 8-3 | |
| - 8-4 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login into Github Docker Registery | |
| run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
| - name: Cache | |
| uses: actions/cache@v4 | |
| id: cache | |
| with: | |
| key: wolfi-apk-cache | |
| path: | | |
| var-cache-apk-arm64 | |
| var-cache-apk-amd64 | |
| - name: Inject cache into docker | |
| uses: reproducible-containers/buildkit-cache-dance@v3 | |
| with: | |
| cache-map: | | |
| { | |
| "var-cache-apk-arm64": { | |
| "target": "/var/cache/apk", | |
| "id": "apk-arm64" | |
| }, | |
| "var-cache-apk-amd64": { | |
| "target": "/var/cache/apk", | |
| "id": "apk-amd64" | |
| } | |
| } | |
| skip-extraction: ${{ steps.cache.outputs.cache-hit }} | |
| - name: Build and push | |
| uses: docker/bake-action@v5 | |
| with: | |
| push: true | |
| targets: base-slim-${{ matrix.php }} | |
| base-full: | |
| name: "Build Base Full" | |
| needs: | |
| - base-slim | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: | |
| - 8-2 | |
| - 8-3 | |
| - 8-4 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Cache | |
| uses: actions/cache@v4 | |
| id: cache | |
| with: | |
| key: wolfi-apk-cache-full | |
| path: | | |
| var-cache-apk-arm64 | |
| var-cache-apk-amd64 | |
| - name: Inject cache into docker | |
| uses: reproducible-containers/buildkit-cache-dance@v3 | |
| with: | |
| cache-map: | | |
| { | |
| "var-cache-apk-arm64": { | |
| "target": "/var/cache/apk", | |
| "id": "apk-arm64" | |
| }, | |
| "var-cache-apk-amd64": { | |
| "target": "/var/cache/apk", | |
| "id": "apk-amd64" | |
| } | |
| } | |
| skip-extraction: ${{ steps.cache.outputs.cache-hit }} | |
| - name: Login into Github Docker Registery | |
| run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
| - name: Build and push | |
| uses: docker/bake-action@v5 | |
| with: | |
| push: true | |
| targets: base-full-${{ matrix.php }} | |
| generate-matrix: | |
| name: "Generate Matrix" | |
| needs: | |
| - base-full | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.generate-matrix.outputs.matrix }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Generate Matrix | |
| id: generate-matrix | |
| run: | | |
| MATRIX=$(node matrix.mjs) | |
| echo "matrix<<EOF" >> $GITHUB_OUTPUT | |
| echo "$MATRIX" >> $GITHUB_OUTPUT | |
| echo 'EOF' >> $GITHUB_OUTPUT | |
| build-flex: | |
| name: "Flex ${{ matrix.swVersion }} / PHP ${{ matrix.phpVersion }}" | |
| runs-on: ubuntu-latest | |
| needs: | |
| - base-full | |
| - generate-matrix | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login into Github Docker Registery | |
| run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
| - name: Build and Push | |
| uses: docker/bake-action@v5 | |
| with: | |
| push: true | |
| targets: symfony-flex | |
| env: | |
| currentPHPVersion: ${{ matrix.phpVersion }} | |
| currentShopwareVersion: ${{ matrix.swVersion }} | |
| build-dev: | |
| name: "Dev ${{ matrix.swVersion }} / PHP ${{ matrix.phpVersion }}" | |
| runs-on: ubuntu-latest | |
| needs: | |
| - base-full | |
| - generate-matrix | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login into Github Docker Registery | |
| run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
| - name: Build and Push | |
| uses: docker/bake-action@v5 | |
| with: | |
| push: true | |
| targets: dev | |
| env: | |
| currentPHPVersion: ${{ matrix.phpVersion }} | |
| currentShopwareVersion: ${{ matrix.swVersion }} |