Skip to content

build(deps): bump docker/setup-buildx-action from 3.6.1 to 3.7.0 in the docker group #570

build(deps): bump docker/setup-buildx-action from 3.6.1 to 3.7.0 in the docker group

build(deps): bump docker/setup-buildx-action from 3.6.1 to 3.7.0 in the docker group #570

Workflow file for this run

name: Build Docker Image
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@d632683dd7b4114ad314bca15554477dd762a938
- 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@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
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: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
if: steps.changes.outputs.needs_build == 'true'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8026d2bc3645ea78b0d2544766a1225eb5691f89 # v3.7.0
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@e1faabf165941008de4c0c1381df153e49d8ad2c # v0.6.0
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'