Skip to content

Commit

Permalink
build: use goreleaser action
Browse files Browse the repository at this point in the history
  • Loading branch information
chetan committed Dec 3, 2021
1 parent e6bb308 commit c6ac7fc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
25 changes: 16 additions & 9 deletions .github/workflows/on_push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ env:
IMAGE_NAME: ${{ github.repository }}

jobs:
lint_and_build:
name: Lint and Build
build_docker:
name: Build Docker
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -27,20 +27,27 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

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

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
context: .
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
version: latest
args: release --rm-dist --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ run:

serve: run

test:
go test ./...

clean:
rm -rf dist/
rm -f traefik-kop

0 comments on commit c6ac7fc

Please sign in to comment.