From 47b03533bf17e99e94f54258ba918567deb17861 Mon Sep 17 00:00:00 2001 From: Marvin Drees Date: Tue, 28 Nov 2023 15:58:33 +0100 Subject: [PATCH 1/3] fix: change example pkg to not have main func Signed-off-by: Marvin Drees --- internal/example/main.go | 8 +------- pkg/example/main.go | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/internal/example/main.go b/internal/example/main.go index 48a005c..fcb5bbf 100644 --- a/internal/example/main.go +++ b/internal/example/main.go @@ -1,9 +1,3 @@ // SPDX-License-Identifier: BSD-3-Clause -package main - -import "log" - -func main() { - log.Println("Template") -} +package example diff --git a/pkg/example/main.go b/pkg/example/main.go index 48a005c..fcb5bbf 100644 --- a/pkg/example/main.go +++ b/pkg/example/main.go @@ -1,9 +1,3 @@ // SPDX-License-Identifier: BSD-3-Clause -package main - -import "log" - -func main() { - log.Println("Template") -} +package example From ea120bbcf689c197278c2cc4ecdeea232ad5ec9c Mon Sep 17 00:00:00 2001 From: Marvin Drees Date: Tue, 28 Nov 2023 15:59:01 +0100 Subject: [PATCH 2/3] fix: proper indentation and set main as default Signed-off-by: Marvin Drees --- .github/workflows/build.yml | 4 ++-- .github/workflows/lint.yml | 4 ++-- .github/workflows/release.yml | 6 +++--- .github/workflows/tests.yml | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0495970..e788c4f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: Build on: push: branches: - - master + - main pull_request: types: - opened @@ -10,7 +10,7 @@ on: - synchronize - ready_for_review branches: - - master + - main permissions: contents: read jobs: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index bad9844..213386d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,7 +2,7 @@ name: Linting on: push: branches: - - master + - main pull_request: types: - opened @@ -10,7 +10,7 @@ on: - synchronize - ready_for_review branches: - - master + - main permissions: contents: read jobs: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 766d6b6..fb32337 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,8 @@ name: Release -on: +on: push: - tags: - - "v*" + tags: + - "v*" permissions: contents: read jobs: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d18d7e2..217e387 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,7 +2,7 @@ name: Tests on: push: branches: - - master + - main pull_request: types: - opened @@ -10,7 +10,7 @@ on: - synchronize - ready_for_review branches: - - master + - main permissions: contents: read jobs: From e3558348b05a752994aca6d180054716efb6d8f3 Mon Sep 17 00:00:00 2001 From: Marvin Drees Date: Tue, 28 Nov 2023 15:59:53 +0100 Subject: [PATCH 3/3] feat: add missing lint job Signed-off-by: Marvin Drees --- .github/workflows/lint.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 213386d..0e760f9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,6 +14,18 @@ on: permissions: contents: read jobs: + commitlint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: ${{ github.event.pull_request.commits }} + ref: ${{ github.event.pull_request.head.sha }} + - name: Commit-Lint + uses: bugbundle/commits@v1.1.0 + id: commits + - run: echo ${{ steps.commits.outputs.major }}.${{ steps.commits.outputs.minor }}.${{ steps.commits.outputs.patch }} golangci-lint: runs-on: ubuntu-latest steps: