Skip to content

Commit

Permalink
chore(.goreleaser.yml): comment out unsupported build targets for sig…
Browse files Browse the repository at this point in the history
…natory and signatory-cli

feat(.goreleaser.yml): add snapshot name template using short commit hash
  • Loading branch information
danielelisi committed Apr 28, 2023
1 parent a20687e commit 6c1a4d4
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 89 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,18 @@ jobs:
DOCKER_USERNAME=${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD=${{ secrets.DOCKER_PASSWORD }}
- run: echo github.sha=${{ github.sha }} github.event.pull_request.head.sha=${{ github.event.pull_request.head.sha }}

- name: goreleaser release preview
run: make release-preview
if: "!startsWith(github.ref, 'refs/tags/v')"

- run: docker image ls

- run: >
docker tag ghcr.io/ecadlabs/signatory:${{ github.event.pull_request.head.sha }}-amd64 ghcr.io/ecadlabs/signatory:${{ github.head_ref || github.ref_name }}-amd64;
docker tag ghcr.io/ecadlabs/signatory:${{ github.event.pull_request.head.sha }}-arm64 ghcr.io/ecadlabs/signatory:${{ github.head_ref || github.ref_name }}-arm64;
docker tag ghcr.io/ecadlabs/signatory:${{ github.event.pull_request.head.sha }}-armv7 ghcr.io/ecadlabs/signatory:${{ github.head_ref || github.ref_name }}-armv7;
docker tag ghcr.io/ecadlabs/signatory:${{ github.sha }}-amd64 ghcr.io/ecadlabs/signatory:${{ github.head_ref || github.ref_name }}-amd64;
docker tag ghcr.io/ecadlabs/signatory:${{ github.sha }}-arm64 ghcr.io/ecadlabs/signatory:${{ github.head_ref || github.ref_name }}-arm64;
docker tag ghcr.io/ecadlabs/signatory:${{ github.sha }}-armv7 ghcr.io/ecadlabs/signatory:${{ github.head_ref || github.ref_name }}-armv7;
- run: docker image ls

Expand All @@ -97,7 +99,7 @@ jobs:
uses: Noelware/docker-manifest-action@0.3.1
with:
inputs: ghcr.io/ecadlabs/signatory:${{ github.head_ref || github.ref_name }}
images: ${{ format('ghcr.io/ecadlabs/signatory:{0}-amd64,ghcr.io/ecadlabs/signatory:{0}-arm64,ghcr.io/ecadlabs/signatory:{0}-armv7', github.event.pull_request.head.sha ) }}
images: ${{ format('ghcr.io/ecadlabs/signatory:{0}-amd64,ghcr.io/ecadlabs/signatory:{0}-arm64,ghcr.io/ecadlabs/signatory:{0}-armv7', github.head_ref || github.ref_name ) }}
push: true
if: "!startsWith(github.ref, 'refs/tags/v')"

Expand Down
170 changes: 85 additions & 85 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,93 +94,93 @@ builds:
- '7'

# MACOS
- id: signatory-darwin-amd
binary: signatory
env:
- CGO_ENABLED=1
- CC=o64-clang
- CXX=o64-clang++
main: ./cmd/signatory/main.go
ldflags:
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitBranch={{.Version}}'
goos:
- darwin
goarch:
- amd64
- id: signatory-cli-darwing-amd
binary: signatory-cli
env:
- CGO_ENABLED=1
- CC=o64-clang
- CXX=o64-clang++
main: ./cmd/signatory-cli/main.go
ldflags:
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitBranch={{.Version}}'
goos:
- darwin
goarch:
- amd64
# - id: signatory-darwin-amd
# binary: signatory
# env:
# - CGO_ENABLED=1
# - CC=o64-clang
# - CXX=o64-clang++
# main: ./cmd/signatory/main.go
# ldflags:
# - '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
# - '-X github.com/ecadlabs/signatory/pkg/metrics.GitBranch={{.Version}}'
# goos:
# - darwin
# goarch:
# - amd64
# - id: signatory-cli-darwing-amd
# binary: signatory-cli
# env:
# - CGO_ENABLED=1
# - CC=o64-clang
# - CXX=o64-clang++
# main: ./cmd/signatory-cli/main.go
# ldflags:
# - '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
# - '-X github.com/ecadlabs/signatory/pkg/metrics.GitBranch={{.Version}}'
# goos:
# - darwin
# goarch:
# - amd64

- id: signatory-darwin-arm
binary: signatory
env:
- CGO_ENABLED=1
- CC=oa64-clang
- CXX=oa64-clang++
main: ./cmd/signatory/main.go
ldflags:
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitBranch={{.Version}}'
goos:
- darwin
goarch:
- arm64
- id: signatory-cli-darwing-arm
binary: signatory-cli
env:
- CGO_ENABLED=1
- CC=oa64-clang
- CXX=oa64-clang++
main: ./cmd/signatory-cli/main.go
ldflags:
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitBranch={{.Version}}'
goos:
- darwin
goarch:
- arm64
# - id: signatory-darwin-arm
# binary: signatory
# env:
# - CGO_ENABLED=1
# - CC=oa64-clang
# - CXX=oa64-clang++
# main: ./cmd/signatory/main.go
# ldflags:
# - '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
# - '-X github.com/ecadlabs/signatory/pkg/metrics.GitBranch={{.Version}}'
# goos:
# - darwin
# goarch:
# - arm64
# - id: signatory-cli-darwing-arm
# binary: signatory-cli
# env:
# - CGO_ENABLED=1
# - CC=oa64-clang
# - CXX=oa64-clang++
# main: ./cmd/signatory-cli/main.go
# ldflags:
# - '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
# - '-X github.com/ecadlabs/signatory/pkg/metrics.GitBranch={{.Version}}'
# goos:
# - darwin
# goarch:
# - arm64

# WINDOWS
- id: signatory-windows-amd
binary: signatory
env:
- CGO_ENABLED=1
- CC=x86_64-w64-mingw32-gcc
- CXX=x86_64-w64-mingw32-g++
main: ./cmd/signatory/main.go
ldflags:
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitBranch={{.Version}}'
goos:
- windows
goarch:
- amd64
- id: signatory-cli-windows-amd
binary: signatory-cli
env:
- CGO_ENABLED=1
- CC=x86_64-w64-mingw32-gcc
- CXX=x86_64-w64-mingw32-g++
main: ./cmd/signatory-cli/main.go
ldflags:
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitBranch={{.Version}}'
goos:
- windows
goarch:
- amd64
# - id: signatory-windows-amd
# binary: signatory
# env:
# - CGO_ENABLED=1
# - CC=x86_64-w64-mingw32-gcc
# - CXX=x86_64-w64-mingw32-g++
# main: ./cmd/signatory/main.go
# ldflags:
# - '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
# - '-X github.com/ecadlabs/signatory/pkg/metrics.GitBranch={{.Version}}'
# goos:
# - windows
# goarch:
# - amd64
# - id: signatory-cli-windows-amd
# binary: signatory-cli
# env:
# - CGO_ENABLED=1
# - CC=x86_64-w64-mingw32-gcc
# - CXX=x86_64-w64-mingw32-g++
# main: ./cmd/signatory-cli/main.go
# ldflags:
# - '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
# - '-X github.com/ecadlabs/signatory/pkg/metrics.GitBranch={{.Version}}'
# goos:
# - windows
# goarch:
# - amd64
dockers:
- ids:
- signatory
Expand Down Expand Up @@ -243,7 +243,7 @@ docker_manifests:
checksum:
name_template: checksums.txt
snapshot:
name_template: '{{ .Version }}-SNAPSHOT-{{.FullCommit}}'
name_template: 'SNAPSHOT-{{.ShortCommit}}'
changelog:
sort: asc
filters:
Expand Down

0 comments on commit 6c1a4d4

Please sign in to comment.