From 633cb9317f297de2846a04201e05aa119653edaf Mon Sep 17 00:00:00 2001 From: Guilhem Lettron Date: Mon, 28 Oct 2019 18:17:07 +0100 Subject: [PATCH 1/9] add lint.yaml --- .github/workflows/lint.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..f9f0285 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,21 @@ +name: lint +on: + push: + pull_request: +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + + - name: Set up Go 1.13 + uses: actions/setup-go@v1 + with: + go-version: 1.13 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v1 + + - name: Go-Linty + uses: ArangoGutierrez/GoLinty-Action@go-1.12-alpine From dca3c00b466bf8e3c0a8756f625e88508b58c121 Mon Sep 17 00:00:00 2001 From: Guilhem Lettron Date: Mon, 28 Oct 2019 18:21:25 +0100 Subject: [PATCH 2/9] Add goreleaser --- .github/workflows/release.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..9dcbf27 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,23 @@ +name: release + +on: + push: + tags: + - '*' + +jobs: + release: + name: Goreleaser + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Set up Go + uses: actions/setup-go@v1 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v1 + with: + version: latest + args: release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 707c7c4646119f92cc76b19f8a1e65a8df4e727f Mon Sep 17 00:00:00 2001 From: Guilhem Lettron Date: Mon, 28 Oct 2019 18:24:46 +0100 Subject: [PATCH 3/9] set GITHUB_TOKEN env --- .github/workflows/lint.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f9f0285..d1bf712 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,3 +19,5 @@ jobs: - name: Go-Linty uses: ArangoGutierrez/GoLinty-Action@go-1.12-alpine + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From fde44efcb12313463bca79953cbee062fe77f23c Mon Sep 17 00:00:00 2001 From: Guilhem Lettron Date: Mon, 28 Oct 2019 18:28:58 +0100 Subject: [PATCH 4/9] use golangci-lint with reviewdog --- .github/workflows/lint.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d1bf712..4944d51 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -17,7 +17,8 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v1 - - name: Go-Linty - uses: ArangoGutierrez/GoLinty-Action@go-1.12-alpine - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Run golangci-lint with reviewdog + uses: reviewdog/action-golangci-lint@v1 + with: + github_token: ${{ secrets.github_token }} + From 28cb15d0dc77700a33813d7ada210a65595615d2 Mon Sep 17 00:00:00 2001 From: Guilhem Lettron Date: Mon, 28 Oct 2019 18:31:49 +0100 Subject: [PATCH 5/9] Only on pull_request --- .github/workflows/lint.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4944d51..a6ab52e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,7 +1,5 @@ name: lint -on: - push: - pull_request: +on: [pull_request] jobs: build: name: Build From 6db92b91cc4aa3ad03c49806e06e78f9416d9e5e Mon Sep 17 00:00:00 2001 From: Guilhem Lettron Date: Mon, 28 Oct 2019 18:38:23 +0100 Subject: [PATCH 6/9] Update lint.yml --- .github/workflows/lint.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a6ab52e..364c5ab 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,18 +5,14 @@ jobs: name: Build runs-on: ubuntu-latest steps: - - - name: Set up Go 1.13 - uses: actions/setup-go@v1 - with: - go-version: 1.13 - id: go - - name: Check out code into the Go module directory uses: actions/checkout@v1 - - name: Run golangci-lint with reviewdog uses: reviewdog/action-golangci-lint@v1 + env: + GO111MODULE: on with: + golangci_lint_flags: "--enable-all --exclude-use-default=false" github_token: ${{ secrets.github_token }} + From 78e925946e0c791667b9d6e0332b6d6d0f9504cd Mon Sep 17 00:00:00 2001 From: Guilhem Lettron Date: Mon, 28 Oct 2019 18:45:01 +0100 Subject: [PATCH 7/9] use docker image --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 364c5ab..cf1ed92 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,7 +8,7 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v1 - name: Run golangci-lint with reviewdog - uses: reviewdog/action-golangci-lint@v1 + uses: docker://reviewdog/action-golangci-lint:v1 env: GO111MODULE: on with: From 0e6e5ba54cd113678ad9b0e7320efcb96f30d710 Mon Sep 17 00:00:00 2001 From: Guilhem Lettron Date: Mon, 28 Oct 2019 18:49:18 +0100 Subject: [PATCH 8/9] Update lint.yml --- .github/workflows/lint.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index cf1ed92..607b294 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,5 +1,5 @@ name: lint -on: [pull_request] +on: [pull_request,push] jobs: build: name: Build @@ -7,12 +7,8 @@ jobs: steps: - name: Check out code into the Go module directory uses: actions/checkout@v1 - - name: Run golangci-lint with reviewdog - uses: docker://reviewdog/action-golangci-lint:v1 + - name: Run GolangCI-Lint Action by pulling pre-built image + uses: docker://matoous/golangci-lint-action:v1 env: GO111MODULE: on - with: - golangci_lint_flags: "--enable-all --exclude-use-default=false" - github_token: ${{ secrets.github_token }} - - + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 7fb40e4e0f8054ebd9b352571c6e387344a142ae Mon Sep 17 00:00:00 2001 From: Guilhem Lettron Date: Mon, 28 Oct 2019 18:50:25 +0100 Subject: [PATCH 9/9] Update lint.yml --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 607b294..ed24fb5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,7 +8,7 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v1 - name: Run GolangCI-Lint Action by pulling pre-built image - uses: docker://matoous/golangci-lint-action:v1 + uses: matoous/golangci-lint-action@v1 env: GO111MODULE: on GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}