Skip to content

Commit

Permalink
Merge pull request #75 from philips-labs/fix-docker-labels
Browse files Browse the repository at this point in the history
Fix docker labels
  • Loading branch information
marcofranssen authored Nov 5, 2021
2 parents f471992 + a620c5b commit 80ce747
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
go-version: 1.17

- name: Checkout
uses: actions/checkout@v2.3.5
uses: actions/checkout@v2.4.0

- name: Cache Go modules
uses: actions/cache@v2.1.6
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
go-version: 1.17

- name: Checkout
uses: actions/checkout@v2.3.5
uses: actions/checkout@v2.4.0
with:
fetch-depth: 0

Expand Down
11 changes: 6 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,19 @@ dockers:
- goos: linux
goarch: amd64
image_templates:
- "philipssoftware/{{ .ProjectName }}:{{ .Tag }}"
- "philipssoftware/{{ .ProjectName }}:{{ .Env.GIT_HASH }}"
- "ghcr.io/philips-labs/{{ .ProjectName }}:{{ .Tag }}"
- "ghcr.io/philips-labs/{{ .ProjectName }}:{{ .Env.GIT_HASH }}"
- "philipssoftware/{{ .ProjectName }}:{{ .Version }}"
- "philipssoftware/{{ .ProjectName }}:{{ .FullCommit }}"
- "ghcr.io/philips-labs/{{ .ProjectName }}:{{ .Version }}"
- "ghcr.io/philips-labs/{{ .ProjectName }}:{{ .FullCommit }}"
build_flag_templates:
- "--pull"
- "--label=com.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.description={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.licenses=MIT"
- "--label=org.opencontainers.image.vendor=Koninklijke Philips N.V."
extra_files:
- "Makefile"
- "go.mod"
Expand Down
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,12 @@ $(GO_PATH)/bin/goreleaser:

.PHONY: snapshot-release
snapshot-release: $(GO_PATH)/bin/goreleaser ## creates a snapshot release using goreleaser
LDFLAGS=$(LDFLAGS) GIT_TAG=$(GIT_TAG) GIT_HASH=$(GIT_HASH) goreleaser release --snapshot --rm-dist
LDFLAGS=$(LDFLAGS) goreleaser release --snapshot --rm-dist

.PHONY: release
release: $(GO_PATH)/bin/goreleaser ## creates a release using goreleaser
LDFLAGS=$(LDFLAGS) GIT_TAG=$(GIT_TAG) GIT_HASH=$(GIT_HASH) goreleaser release
LDFLAGS=$(LDFLAGS) goreleaser release

.PHONY: release-vars
release-vars: ## print the release variables for goreleaser
@echo export LDFLAGS=\"$(LDFLAGS)\"
@echo export GIT_HASH=$(GIT_HASH)

0 comments on commit 80ce747

Please sign in to comment.