build(deps): bump alpine from 3.22.2 to 3.23.0 in /base-images/src/alpine-base #725
Workflow file for this run
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 images | |
| on: | |
| pull_request: | |
| branches: | |
| - trunk | |
| merge_group: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| prepare: | |
| name: Prepare list of images to build | |
| runs-on: ubuntu-latest | |
| outputs: | |
| images: ${{ steps.set-matrix.outputs.images }} | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v5 | |
| - name: Set matrix | |
| id: set-matrix | |
| run: echo images="$(jq '."x-build"' base-images/src/*/.devcontainer.json | jq --slurp -c .)" >> "${GITHUB_OUTPUT}" | |
| prepare-others: | |
| name: Prepare list of other images to build | |
| runs-on: ubuntu-latest | |
| outputs: | |
| images: ${{ steps.set-matrix.outputs.images }} | |
| steps: | |
| - name: Check out the source code | |
| uses: actions/checkout@v5 | |
| - name: Set matrix | |
| id: set-matrix | |
| run: echo images="$(jq '."x-build"' images/src/*/.devcontainer.json | jq --slurp -c .)" >> "${GITHUB_OUTPUT}" | |
| build: | |
| needs: prepare | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| image: ${{ fromJson(needs.prepare.outputs.images) }} | |
| name: Build image ${{ matrix.image.name }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check changed files | |
| id: changes | |
| run: | | |
| base="${{ github.event.pull_request.base.sha }}" | |
| head="${{ github.event.pull_request.head.sha }}" | |
| image="base-images/src/${{ matrix.image.image-name }}" | |
| changes="$(git diff --name-only "${base}" "${head}" -- "${image}" | grep -Fv "${image}/README.md" || true)" | |
| if [ -n "${changes}" ]; then | |
| echo needs_build=true >> "${GITHUB_OUTPUT}" | |
| else | |
| echo needs_build=false >> "${GITHUB_OUTPUT}" | |
| fi | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0 | |
| if: steps.changes.outputs.needs_build == 'true' | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 | |
| if: steps.changes.outputs.needs_build == 'true' | |
| - name: Install @devcontainers/cli | |
| run: npm install -g @devcontainers/cli | |
| if: steps.changes.outputs.needs_build == 'true' | |
| - name: Expose GitHub Runtime | |
| uses: Automattic/vip-actions/expose-github-runtime@7b98dcb98d652bf02037977b1b85abb971c345d0 # v0.7.1 | |
| if: steps.changes.outputs.needs_build == 'true' | |
| - name: Build image | |
| run: | | |
| devcontainer build \ | |
| --workspace-folder "base-images/src/${{ matrix.image.image-name }}" \ | |
| --platform linux/amd64,linux/arm64 \ | |
| --output type=image \ | |
| --cache-from type=gha \ | |
| --cache-to type=gha,mode=max | |
| if: steps.changes.outputs.needs_build == 'true' | |
| build-other-images: | |
| needs: | |
| - prepare-others | |
| name: 'Build image ${{ matrix.image.name }}' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| image: ${{ fromJson(needs.prepare-others.outputs.images) }} | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check changed files | |
| id: changes | |
| run: | | |
| base="${{ github.event.pull_request.base.sha }}" | |
| head="${{ github.event.pull_request.head.sha }}" | |
| image="images/src/${{ matrix.image.image-name }}" | |
| changes="$(git diff --name-only "${base}" "${head}" -- "${image}" | grep -Fv "${image}/README.md" || true)" | |
| if [ -n "${changes}" ]; then | |
| echo needs_build=true >> "${GITHUB_OUTPUT}" | |
| else | |
| echo needs_build=false >> "${GITHUB_OUTPUT}" | |
| fi | |
| - name: Expose GitHub Runtime | |
| uses: Automattic/vip-actions/expose-github-runtime@7b98dcb98d652bf02037977b1b85abb971c345d0 # v0.7.1 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0 | |
| if: steps.changes.outputs.needs_build == 'true' | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 | |
| if: steps.changes.outputs.needs_build == 'true' | |
| - name: Install @devcontainers/cli | |
| run: npm install -g @devcontainers/cli | |
| if: ${{ steps.changes.outputs.needs_build == 'true' }} | |
| - name: Build image | |
| run: | | |
| devcontainer build \ | |
| --workspace-folder images/src/${{ matrix.image.image-name }} \ | |
| --platform linux/amd64,linux/arm64 \ | |
| --output type=image \ | |
| --cache-from type=gha \ | |
| --cache-to type=gha,mode=max | |
| if: ${{ steps.changes.outputs.needs_build == 'true' }} |