ci: update bake-action to v6

This commit is contained in:
CrazyMax 2025-03-30 01:25:25 +01:00
parent 9ae418490f
commit 0611e9b059
No known key found for this signature in database
GPG Key ID: ADE44D8C9D44FBE4
3 changed files with 19 additions and 10 deletions

View File

@ -26,8 +26,9 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- -
name: Test name: Test
uses: docker/bake-action@v5 uses: docker/bake-action@v6
with: with:
source: .
targets: test targets: test
- -
name: Upload coverage name: Upload coverage

View File

@ -14,21 +14,24 @@ on:
- 'master' - 'master'
- 'releases/v*' - 'releases/v*'
pull_request: pull_request:
paths-ignore:
- '.github/upx-releases.json'
jobs: jobs:
prepare: prepare:
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
targets: ${{ steps.targets.outputs.matrix }} targets: ${{ steps.generate.outputs.targets }}
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- -
name: Targets matrix name: List targets
id: targets id: generate
run: | uses: docker/bake-action/subaction/list-targets@v6
echo "matrix=$(docker buildx bake validate --print | jq -cr '.group.validate.targets')" >> $GITHUB_OUTPUT with:
target: validate
validate: validate:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -39,11 +42,8 @@ jobs:
matrix: matrix:
target: ${{ fromJson(needs.prepare.outputs.targets) }} target: ${{ fromJson(needs.prepare.outputs.targets) }}
steps: steps:
-
name: Checkout
uses: actions/checkout@v4
- -
name: Validate name: Validate
uses: docker/bake-action@v5 uses: docker/bake-action@v6
with: with:
targets: ${{ matrix.target }} targets: ${{ matrix.target }}

View File

@ -1,3 +1,9 @@
target "_common" {
args = {
BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1
}
}
group "default" { group "default" {
targets = ["build"] targets = ["build"]
} }
@ -17,6 +23,7 @@ target "build" {
} }
target "build-validate" { target "build-validate" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile" dockerfile = "dev.Dockerfile"
target = "build-validate" target = "build-validate"
output = ["type=cacheonly"] output = ["type=cacheonly"]
@ -41,6 +48,7 @@ target "vendor-update" {
} }
target "vendor-validate" { target "vendor-validate" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile" dockerfile = "dev.Dockerfile"
target = "vendor-validate" target = "vendor-validate"
output = ["type=cacheonly"] output = ["type=cacheonly"]