Skip to content

Commit

Permalink
fix docker-bake references
Browse files Browse the repository at this point in the history
  • Loading branch information
iwilltry42 committed Mar 14, 2022
1 parent 826f1c9 commit 4d10440
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ jobs:
release:
name: Build & Release
# Only run on tags
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-20.04
steps:
# Setup
Expand Down Expand Up @@ -142,16 +141,16 @@ jobs:
type=ref,event=pr
type=sha
# Build and Push container images
- name: Build & Push Images
uses: docker/bake-action@v1
- name: Build Images
uses: docker/bake-action@v1.7.0
with:
files: |
./docker-bake.hcl
${{ steps.meta-k3d-binary.outputs.bake-file }}
${{ steps.meta-k3d-dind.outputs.bake-file }}
${{ steps.meta-k3d-proxy.outputs.bake-file }}
${{ steps.meta-k3d-tools.outputs.bake-file }}
targets: release
targets: binary,dind,proxy,tools
push: false
- name: Wait for tests to succeed
uses: lewagon/[email protected]
Expand All @@ -160,14 +159,15 @@ jobs:
check-name: "Full Test Suite"
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 20
- name: Build & Push Images
uses: docker/bake-action@v1
- name: Push Images
if: startsWith(github.ref, 'refs/tags/')
uses: docker/[email protected]
with:
files: |
./docker-bake.hcl
${{ steps.meta-k3d-binary.outputs.bake-file }}
${{ steps.meta-k3d-dind.outputs.bake-file }}
${{ steps.meta-k3d-proxy.outputs.bake-file }}
${{ steps.meta-k3d-tools.outputs.bake-file }}
targets: build
targets: binary,dind,proxy,tools
push: false # TODO: change to true on release
12 changes: 4 additions & 8 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// release group
group "release" {
targets = ["binary", "dind", "proxy", "tools"]
}

// filled by GitHub Actions
target "docker-metadata-k3d" {}
target "docker-metadata-k3d-dind" {}
Expand All @@ -11,28 +6,29 @@ target "docker-metadata-k3d-tools" {}

// default options for creating a release
target "default-release-options" {
inherits = ["docker-metadata-action"]
platforms = ["linux/amd64", "linux/arm64", "linux/arm/v7"]
}

target "binary" {
inherits = ["default-release-options"]
inherits = ["default-release-options", "docker-metadata-k3d"]
dockerfile = "Dockerfile"
context = "."
target = "binary-only"
}

target "dind" {
inherits = ["default-release-options"]
inherits = ["default-release-options", "docker-metadata-k3d-dind"]
dockerfile = "Dockerfile"
context = "."
target = "dind"
}

target "proxy" {
inherits = ["default-release-options", "docker-metadata-k3d-proxy"]
context = "proxy/"
}

target "tools" {
inherits = ["default-release-options", "docker-metadata-k3d-tools"]
context = "tools/"
}

0 comments on commit 4d10440

Please sign in to comment.