Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasper-Ben committed Aug 19, 2024
1 parent 80d4956 commit 15491eb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/release-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
env:
KO_DOCKER_REPO: ghcr.io/${{ steps.lowercase-repository-name.outputs.lowercase }}
SOURCE_TAG: ${{ steps.tag_name.outputs.SOURCE_TAG }}
GOFLAGS: "-ldflags=\"-X=github.com/google/go-containerregistry/cmd/crane/cmd.Version=${{ steps.tag_name.outputs.SOURCE_TAG }} '-X=github.com/google/go-containerregistry/pkg/v1/remote/transport.Version={{.Version}}'\""
KO_CONFIG_PATH: ${{ github.workspace }}/.ko/default/.ko.yaml
- name: Build the crane-ish builder debug images
run: |
ko build -B github.com/google/go-containerregistry/cmd/crane -t "debug"
Expand All @@ -51,7 +51,6 @@ jobs:
ko build -B github.com/google/go-containerregistry/cmd/krane -t "debug"
env:
KO_CONFIG_PATH: ${{ github.workspace }}/.ko/debug/.ko.yaml
GOFLAGS: "-ldflags=\"-X=github.com/google/go-containerregistry/cmd/crane/cmd.Version=${{ steps.tag_name.outputs.SOURCE_TAG }} '-X=github.com/google/go-containerregistry/pkg/v1/remote/transport.Version={{.Version}}'\""
- name: Build the tag specific debug images
run: |
KO_DOCKER_REPO=ghcr.io/${{ steps.lowercase-repository-name.outputs.lowercase }}/crane/debug ko build --bare github.com/google/go-containerregistry/cmd/crane -t latest -t $GITHUB_SHA -t $SOURCE_TAG
Expand All @@ -62,4 +61,3 @@ jobs:
env:
KO_CONFIG_PATH: ${{ github.workspace }}/.ko/debug/.ko.yaml
SOURCE_TAG: ${{ steps.tag_name.outputs.SOURCE_TAG }}
GOFLAGS: "-ldflags=\"-X=github.com/google/go-containerregistry/cmd/crane/cmd.Version=${{ steps.tag_name.outputs.SOURCE_TAG }} '-X=github.com/google/go-containerregistry/pkg/v1/remote/transport.Version={{.Version}}'\""
5 changes: 5 additions & 0 deletions .ko/debug/.ko.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
defaultBaseImage: gcr.io/distroless/base:debug
defaultFlags:
- -trimpath
defaultLdflags:
- -X github.com/google/go-containerregistry/cmd/crane/cmd.Version={{.Git.Tag}}
- -X github.com/google/go-containerregistry/pkg/v1/remote/transport.Version={{.Git.Tag}}
5 changes: 5 additions & 0 deletions .ko/default/.ko.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
defaultFlags:
- -trimpath
defaultLdflags:
- -X github.com/google/go-containerregistry/cmd/crane/cmd.Version={{.Git.Tag}}
- -X github.com/google/go-containerregistry/pkg/v1/remote/transport.Version={{.Git.Tag}}

0 comments on commit 15491eb

Please sign in to comment.