Skip to content

Commit

Permalink
chore: docker buildx
Browse files Browse the repository at this point in the history
  • Loading branch information
lenye committed Oct 19, 2023
1 parent d194d78 commit 4168f11
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 27 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,16 @@ jobs:
go-version: ${{ env.GO_VERSION }}
check-latest: true

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GO_RELEASER_GITHUB_TOKEN }}

- name: Docker Pull Base Image
run: |
docker pull --platform amd64 gcr.io/distroless/static-debian11
docker pull --platform arm64 gcr.io/distroless/static-debian11
docker pull --platform arm gcr.io/distroless/static-debian11
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
Expand Down
21 changes: 0 additions & 21 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,24 +112,6 @@ dockers:
- "--label=org.opencontainers.image.source=https://github.com/lenye/{{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- image_templates:
- "ghcr.io/lenye/{{ .ProjectName }}:{{ .Tag }}-armv6"
- "ghcr.io/lenye/{{ .ProjectName }}:{{ .Version }}-armv6"
- "ghcr.io/lenye/{{ .ProjectName }}:latest-armv6"
use: buildx
goos: linux
goarch: arm
goarm: 6
dockerfile: Dockerfile
build_flag_templates:
- "--platform=linux/arm/v6"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.description={{.ProjectName}}"
- "--label=org.opencontainers.image.url=https://github.com/lenye/{{.ProjectName}}"
- "--label=org.opencontainers.image.source=https://github.com/lenye/{{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- image_templates:
- "ghcr.io/lenye/{{ .ProjectName }}:{{ .Tag }}-armv7"
- "ghcr.io/lenye/{{ .ProjectName }}:{{ .Version }}-armv7"
Expand All @@ -154,17 +136,14 @@ docker_manifests:
image_templates:
- ghcr.io/lenye/{{ .ProjectName }}:{{ .Tag }}-amd64
- ghcr.io/lenye/{{ .ProjectName }}:{{ .Tag }}-arm64
- ghcr.io/lenye/{{ .ProjectName }}:{{ .Tag }}-armv6
- ghcr.io/lenye/{{ .ProjectName }}:{{ .Tag }}-armv7
- name_template: ghcr.io/lenye/{{ .ProjectName }}:{{ .Version }}
image_templates:
- ghcr.io/lenye/{{ .ProjectName }}:{{ .Version }}-amd64
- ghcr.io/lenye/{{ .ProjectName }}:{{ .Version }}-arm64
- ghcr.io/lenye/{{ .ProjectName }}:{{ .Version }}-armv6
- ghcr.io/lenye/{{ .ProjectName }}:{{ .Version }}-armv7
- name_template: ghcr.io/lenye/{{ .ProjectName }}:latest
image_templates:
- ghcr.io/lenye/{{ .ProjectName }}:latest-amd64
- ghcr.io/lenye/{{ .ProjectName }}:latest-arm64
- ghcr.io/lenye/{{ .ProjectName }}:latest-armv6
- ghcr.io/lenye/{{ .ProjectName }}:latest-armv7

0 comments on commit 4168f11

Please sign in to comment.