Skip to content
This repository has been archived by the owner on Oct 7, 2023. It is now read-only.

Commit

Permalink
revamp github actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
markpash committed Dec 18, 2021
1 parent 2746ad2 commit 3edafb2
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 19 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: checks

on:
push:
branches: ['master']
pull_request:
branches: ['*']

jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: WillAbides/setup-go-faster@v1.7.0
with:
go-version: 1.17
- run: go install mvdan.cc/gofumpt@latest
- run: test -z $(gofumpt -l .)
- run: go vet ./...
- run: go build ./...
19 changes: 0 additions & 19 deletions .github/workflows/push-image.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: release

on:
push:
tags: ['v*']

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: WillAbides/setup-go-faster@v1.7.0
with:
go-version: 1.17
- uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: imjasonh/setup-ko@v0.4
- run: |
ko publish -B --platform=linux/amd64,linux/arm64 \
--tags=latest,$(git describe --tag --always --dirty) ./
env:
KO_DOCKER_REPO: ghcr.io/${{ github.repository_owner }}

0 comments on commit 3edafb2

Please sign in to comment.