chore(deps): update actions/dependency-review-action action to v4.5.0 #188
Workflow file for this run
This file contains 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: | |
pull_request: | |
branches: | |
- master | |
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 source code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set matrix | |
id: set-matrix | |
run: echo images="$(jq '."x-build"' images/src/*/.devcontainer.json | jq --slurp -c .)" >> "${GITHUB_OUTPUT}" | |
build-image: | |
needs: prepare | |
strategy: | |
fail-fast: false | |
matrix: | |
image: ${{ fromJson(needs.prepare.outputs.images) }} | |
name: Build ${{ matrix.image.name }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the source code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
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@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.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 | |
if: steps.changes.outputs.needs_build == 'true' |