Skip to content

Commit

Permalink
ACTIONS: Update rleease action & goreleaser to support Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Cian911 committed Jan 23, 2022
1 parent 4c08ccf commit e5ff9f2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
push:
tags:
- "*"

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
Expand All @@ -12,6 +16,14 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
- name: Docker Login
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
- name: Go Setup
uses: actions/setup-go@v2
with:
Expand Down
16 changes: 15 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,21 @@ builds:
- 5
- 6
- 7

dockers:
-
image_templates: ["ghcr.io/cian911/{{ .ProjectName }}:{{ .Version }}"]
dockerfile: Dockerfile
use: buildx
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/cian911/{{ .ProjectName }}
- --label=org.opencontainers.image.source=https://github.com/cian911/{{ .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=GPL-3.0
archives:
-
id: switchboard
Expand Down

0 comments on commit e5ff9f2

Please sign in to comment.