mirror of
https://github.com/moby/buildkit.git
synced 2026-08-06 07:40:49 +00:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 7.0.0 to 7.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](9c091bb21b...3d3c42e5aa)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-version: 7.0.1
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
88 lines
2.6 KiB
YAML
88 lines
2.6 KiB
YAML
name: validate
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
- 'v[0-9]+.[0-9]+'
|
|
tags:
|
|
- 'v*'
|
|
- 'dockerfile/*'
|
|
pull_request:
|
|
|
|
env:
|
|
SETUP_BUILDX_VERSION: "edge"
|
|
SETUP_BUILDKIT_IMAGE: "moby/buildkit:latest"
|
|
|
|
jobs:
|
|
prepare:
|
|
runs-on: ubuntu-24.04
|
|
outputs:
|
|
includes: ${{ steps.matrix.outputs.includes }}
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
-
|
|
name: Generate matrix
|
|
id: generate
|
|
uses: docker/bake-action/subaction/matrix@d3418bd7d0e9324001bca92fa8ba175ea7e6dc9b # v7.3.0
|
|
with:
|
|
target: validate
|
|
fields: platforms
|
|
env:
|
|
GOLANGCI_LINT_MULTIPLATFORM: ${{ github.repository == 'moby/buildkit' && '1' || '' }}
|
|
ARCHUTIL_MULTIPLATFORM: ${{ github.repository == 'moby/buildkit' && '1' || '' }}
|
|
-
|
|
name: Add runner to matrix
|
|
id: matrix
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
env:
|
|
INPUT_MATRIX: ${{ steps.generate.outputs.matrix }}
|
|
INPUT_PRIVATE-REPO: ${{ github.event.repository.private }}
|
|
with:
|
|
script: |
|
|
const matrix = JSON.parse(core.getInput('matrix'));
|
|
const privateRepo = core.getBooleanInput('private-repo');
|
|
matrix.forEach(job => {
|
|
if (job.platforms && job.platforms.startsWith('linux/arm') && !privateRepo) {
|
|
job.runner = 'ubuntu-24.04-arm';
|
|
} else {
|
|
job.runner = 'ubuntu-24.04';
|
|
}
|
|
});
|
|
core.info(JSON.stringify(matrix, null, 2));
|
|
core.setOutput('includes', JSON.stringify(matrix));
|
|
|
|
validate:
|
|
runs-on: ${{ matrix.runner }}
|
|
needs:
|
|
- prepare
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include: ${{ fromJson(needs.prepare.outputs.includes) }}
|
|
steps:
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
|
|
with:
|
|
version: ${{ env.SETUP_BUILDX_VERSION }}
|
|
driver-opts: image=${{ env.SETUP_BUILDKIT_IMAGE }}
|
|
buildkitd-flags: --debug
|
|
-
|
|
name: Validate
|
|
uses: docker/bake-action@d3418bd7d0e9324001bca92fa8ba175ea7e6dc9b # v7.3.0
|
|
with:
|
|
targets: ${{ matrix.target }}
|
|
set: |
|
|
*.platform=${{ matrix.platforms }}
|