Skip to content

Commit

Permalink
Add support to publish image via goreleaser (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
LinuxSuRen authored Sep 30, 2021
1 parent e5b6fc6 commit fa5957d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ jobs:
rm -rf upx-3.96-amd64_linux
rm -rf xvf upx-3.96-amd64_linux.tar.xz
upx -V
- name: Image Registry Login
run: |
docker login --username ${{ secrets.DOCKER_HUB_USER }} --password ${{secrets.DOCKER_HUB_TOKEN}}
docker login ghcr.io/linuxsuren --username linuxsuren --password ${{secrets.GH_PUBLISH_SECRETS}}
- name: Run GoReleaser
uses: goreleaser/[email protected]
with:
Expand Down
16 changes: 16 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,19 @@ nfpms:
darwin: macOS
linux: linux
windows: windows
dockers:
- goos: linux
goarch: amd64
image_templates:
- "surenpi/hd:latest"
- "surenpi/hd:{{.Tag}}"
- "ghcr.io/linuxsuren/hd:latest"
- "ghcr.io/linuxsuren/hd:{{.Tag}}"
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source=https://github.com/LinuxSuRen/http-downloader"
- "--platform=linux/arm64"
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM alpine:3.10

COPY hd /usr/bin/hd

CMD ["hd"]

0 comments on commit fa5957d

Please sign in to comment.