diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c6aaa85..74b3814 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,8 +1,6 @@ name: Lint -on: - pull_request: - push: +on: [pull_request, push] jobs: golangci: @@ -10,10 +8,12 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.16 + go-version: 1.17 + - name: GolangCi Lint uses: golangci/golangci-lint-action@v2 with: diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index d2141aa..2da6d1d 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -1,7 +1,6 @@ name: Pull Request -on: - pull_request: +on: [pull_request] jobs: pull: @@ -13,7 +12,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.16 + go-version: 1.17 - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 0000000..b4351b9 --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,32 @@ +name: Push + +on: [push] + +jobs: + mod-tidy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + persist-credentials: false + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17 + + - name: Tidy + run: go mod tidy + - name: Commit + run: | + git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git commit -m "go mod tidy" -a + + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ github.ref }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3f653d2..a3940ed 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,12 +14,12 @@ jobs: - name: Checkout uses: actions/checkout@v2 with: - fetch-depth: '0' + fetch-depth: 0 - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.16 + go-version: 1.17 - name: Semantic Release uses: go-semantic-release/action@v1