Skip to content

Commit

Permalink
ci: update bake-action to v6 (#493)
Browse files Browse the repository at this point in the history
  • Loading branch information
CrazyMax authored and GitHub committed Mar 30, 2025
1 parent 73c477b commit 9c156ee
Showing 4 changed files with 19 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ jobs:
matrix:
os:
- ubuntu-latest
- macOS-latest
- macos-latest
- windows-latest
version:
- latest
@@ -108,7 +108,7 @@ jobs:
matrix:
os:
- ubuntu-latest
- macOS-latest
- macos-latest
- windows-latest
steps:
-
@@ -210,7 +210,7 @@ jobs:
matrix:
os:
- ubuntu-latest
- macOS-latest
- macos-latest
- windows-latest
distribution:
- goreleaser-pro
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@ jobs:
name: Test
uses: docker/bake-action@v6
with:
source: .
targets: test
-
name: Upload coverage
16 changes: 7 additions & 9 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -15,16 +15,17 @@ jobs:
prepare:
runs-on: ubuntu-latest
outputs:
targets: ${{ steps.targets.outputs.matrix }}
targets: ${{ steps.generate.outputs.targets }}
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Targets matrix
id: targets
run: |
echo "matrix=$(docker buildx bake validate --print | jq -cr '.group.validate.targets')" >> $GITHUB_OUTPUT
name: List targets
id: generate
uses: docker/bake-action/subaction/list-targets@v6
with:
target: validate

validate:
runs-on: ubuntu-latest
@@ -35,11 +36,8 @@ jobs:
matrix:
target: ${{ fromJson(needs.prepare.outputs.targets) }}
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Validate
uses: docker/bake-action@v5
uses: docker/bake-action@v6
with:
targets: ${{ matrix.target }}
8 changes: 8 additions & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
target "_common" {
args = {
BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1
}
}

group "default" {
targets = ["build"]
}
@@ -17,6 +23,7 @@ target "build" {
}

target "build-validate" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile"
target = "build-validate"
output = ["type=cacheonly"]
@@ -41,6 +48,7 @@ target "vendor" {
}

target "vendor-validate" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile"
target = "vendor-validate"
output = ["type=cacheonly"]

0 comments on commit 9c156ee

Please sign in to comment.