Skip to content

Commit

Permalink
github acction
Browse files Browse the repository at this point in the history
  • Loading branch information
chandanpasunoori committed Nov 6, 2022
1 parent 917b2c4 commit 3173078
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 10 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: goreleaser

on:
push:
tags:
- '*'

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_PAT }}
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 0 additions & 10 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ changelog:
dockers:
- image_templates:
- ghcr.io/chandanpasunoori/{{ .ProjectName }}:{{ .Version }}-amd64
- docker.io/chandanpasunoori/{{ .ProjectName }}:{{ .Version }}-amd64
dockerfile: Dockerfile
use: buildx
build_flag_templates:
Expand All @@ -50,7 +49,6 @@ dockers:
- --label=org.opencontainers.image.licenses=MIT
- image_templates:
- ghcr.io/chandanpasunoori/{{ .ProjectName }}:{{ .Version }}-arm64v8
- docker.io/chandanpasunoori/{{ .ProjectName }}:{{ .Version }}-arm64v8
goarch: arm64
dockerfile: Dockerfile
use: buildx
Expand All @@ -73,11 +71,3 @@ docker_manifests:
image_templates:
- ghcr.io/chandanpasunoori/{{ .ProjectName }}:{{ .Version }}-amd64
- ghcr.io/chandanpasunoori/{{ .ProjectName }}:{{ .Version }}-arm64v8
- name_template: docker.io/chandanpasunoori/{{ .ProjectName }}:{{ .Version }}
image_templates:
- docker.io/chandanpasunoori/{{ .ProjectName }}:{{ .Version }}-amd64
- docker.io/chandanpasunoori/{{ .ProjectName }}:{{ .Version }}-arm64v8
- name_template: docker.io/chandanpasunoori/{{ .ProjectName }}:latest
image_templates:
- docker.io/chandanpasunoori/{{ .ProjectName }}:{{ .Version }}-amd64
- docker.io/chandanpasunoori/{{ .ProjectName }}:{{ .Version }}-arm64v8

0 comments on commit 3173078

Please sign in to comment.