Skip to content

Commit

Permalink
Merge pull request #63 from crazy-max/bake-v6
Browse files Browse the repository at this point in the history
ci: update bake-action to v6
  • Loading branch information
thaJeztah authored Jan 10, 2025
2 parents a33364e + fee93a5 commit da2cb99
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 9 deletions.
33 changes: 24 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,42 @@ on:
pull_request:

jobs:
validate:
prepare-validate:
runs-on: ubuntu-latest
outputs:
targets: ${{ steps.generate.outputs.targets }}
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Run
uses: docker/bake-action@v5
name: List targets
id: generate
uses: docker/bake-action/subaction/list-targets@v6
with:
targets: validate
target: validate

test:
validate:
runs-on: ubuntu-latest
needs:
- prepare-validate
strategy:
fail-fast: false
matrix:
target: ${{ fromJson(needs.prepare-validate.outputs.targets) }}
steps:
-
name: Checkout
uses: actions/checkout@v4
name: Validate
uses: docker/bake-action@v6
with:
targets: ${{ matrix.target }}

test:
runs-on: ubuntu-latest
steps:
-
name: Run
uses: docker/bake-action@v5
name: Test
uses: docker/bake-action@v6
with:
targets: test
-
Expand Down
12 changes: 12 additions & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.

target "_common" {
args = {
BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1
}
}

group "default" {
targets = ["test"]
}
Expand All @@ -21,31 +27,37 @@ group "validate" {
}

target "lint" {
inherits = ["_common"]
target = "lint"
output = ["type=cacheonly"]
}

target "vendor-validate" {
inherits = ["_common"]
target = "vendor-validate"
output = ["type=cacheonly"]
}

target "vendor-update" {
inherits = ["_common"]
target = "vendor-update"
output = ["."]
}

target "test" {
inherits = ["_common"]
target = "test-coverage"
output = ["."]
}

target "license-validate" {
inherits = ["_common"]
target = "license-validate"
output = ["type=cacheonly"]
}

target "license-update" {
inherits = ["_common"]
target = "license-update"
output = ["."]
}

0 comments on commit da2cb99

Please sign in to comment.