From 7ea8ae4441a97358047ecb28713087a5a2d9abdf Mon Sep 17 00:00:00 2001 From: Keith Gaughan Date: Sun, 11 Jun 2023 16:01:05 +0100 Subject: [PATCH] Decouple building and linting (#43) --- .github/workflows/{go.yml => build.yml} | 16 +++------------- .github/workflows/lint.yml | 19 +++++++++++++++++++ .github/workflows/release.yml | 4 ++++ 3 files changed, 26 insertions(+), 13 deletions(-) rename .github/workflows/{go.yml => build.yml} (54%) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/go.yml b/.github/workflows/build.yml similarity index 54% rename from .github/workflows/go.yml rename to .github/workflows/build.yml index c063e9c..c29b5de 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/build.yml @@ -1,16 +1,11 @@ --- -name: Go +name: Build on: - push: - branches: - - master - pull_request: - branches: - - master + - push + - pull_request jobs: - build: runs-on: ubuntu-latest steps: @@ -21,10 +16,5 @@ jobs: with: go-version: 1.18 - - name: Lint - uses: golangci/golangci-lint-action@v3 - with: - version: v1.52.2 - - name: Build run: make diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..6bf5556 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,19 @@ +--- +name: Lint + +on: + - push + - pull_request + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.52.2 + args: --issues-exit-code=0 + only-new-issues: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8ad7843..9b8cb03 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,6 +6,10 @@ on: tags: - 'v*' +concurrency: + group: releaser + cancel-in-progress: true + env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }}