diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 73dd9f0..8deb900 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -28,12 +28,6 @@ jobs: with: go-version: ^1.21.x - - name: Get Tag - id: tag - uses: devops-actions/action-get-tag@v1.0.2 - with: - strip_v: true - - uses: docker/setup-qemu-action@v2 - name: Log in to the GitHub Container registry @@ -48,6 +42,6 @@ jobs: with: distribution: goreleaser version: latest - args: release --rm-dist + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 69f6741..11cac51 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -13,9 +13,6 @@ builds: goarch: - amd64 - arm64 - goarm: - - "6" - - "7" ldflags: - -X github.com/ardikabs/{{ .ProjectName }}/cmd.Version={{.Version}} - -X github.com/ardikabs/{{ .ProjectName }}/cmd.GitCommit={{.Commit}} @@ -76,6 +73,24 @@ dockers: - --label=org.opencontainers.image.revision={{ .FullCommit }} - --label=org.opencontainers.image.licenses=MIT + - goos: linux + goarch: amd64 + goamd64: v1 + use: buildx + dockerfile: Dockerfile.cpuv1 + image_templates: + - "ghcr.io/ardikabs/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}.{{ .Patch }}-cpuv1" + build_flag_templates: + - --platform=linux/amd64 + - --label=org.opencontainers.image.title={{ .ProjectName }} + - --label=org.opencontainers.image.description={{ .ProjectName }} + - --label=org.opencontainers.image.url=https://github.com/ardikabs/{{ .ProjectName }} + - --label=org.opencontainers.image.source=https://github.com/ardikabs/{{ .ProjectName }} + - --label=org.opencontainers.image.version={{ .Version }} + - --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }} + - --label=org.opencontainers.image.revision={{ .FullCommit }} + - --label=org.opencontainers.image.licenses=MIT + docker_manifests: - name_template: ghcr.io/ardikabs/{{ .ProjectName }}:latest image_templates: diff --git a/Dockerfile.cpuv1 b/Dockerfile.cpuv1 new file mode 100644 index 0000000..4085ac3 --- /dev/null +++ b/Dockerfile.cpuv1 @@ -0,0 +1,4 @@ +FROM alpine:3.14 + +COPY helmize /usr/bin/helmize +CMD ["/usr/bin/helmize"] \ No newline at end of file