diff --git a/.github/workflows/go-coverage-merge.yml b/.github/workflows/go-coverage-merge.yml index cfa502c..e11543d 100644 --- a/.github/workflows/go-coverage-merge.yml +++ b/.github/workflows/go-coverage-merge.yml @@ -393,7 +393,7 @@ jobs: run: | echo "# 👮‍♂️ Linters check" >> $GITHUB_STEP_SUMMARY echo "## Golangci lint" >> $GITHUB_STEP_SUMMARY - go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest + go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.15.0 echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY golangci-lint run -v ./... 2>&1 | tee -a $GITHUB_STEP_SUMMARY echo "\`\`\`" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/go-ver-update.yml b/.github/workflows/go-ver-update.yml index 75d856f..61d320f 100644 --- a/.github/workflows/go-ver-update.yml +++ b/.github/workflows/go-ver-update.yml @@ -11,6 +11,10 @@ on: description: 'Update dependencies in modules' default: false type: boolean + Workflows: + description: 'Update go version in workflows' + default: false + type: boolean PR: description: 'Create Pull Request' default: false @@ -44,7 +48,6 @@ jobs: go build -v -o /dev/null ./... - name: Update Go version - if: ${{ github.event.inputs.Version != '' }} run: | go mod edit -go=${{ github.event.inputs.Version }} # go mod edit -toolchain=go${{ github.event.inputs.Version }} @@ -64,6 +67,11 @@ jobs: go vet ./... go build -v -o /dev/null ./... + - name: Update Go version in workflows + if: ${{ github.event.inputs.Workflows == 'true' }} + run: | + sed -i -E "s/go-version:\s*[0-9.]+/go-version: ${{ github.event.inputs.Version }}/" .github/workflows/*.yml + - name: Create Pull Request for update go version and modules if: ${{ github.event.inputs.Modules == 'true' && github.event.inputs.PR == 'true' }} uses: peter-evans/create-pull-request@v8 @@ -75,4 +83,5 @@ jobs: body: "Updated Go version to **${{ github.event.inputs.Version }}** as well as the module dependencies in `go.mod` and `go.sum`." add-paths: | go.mod - go.sum \ No newline at end of file + go.sum + .github/workflows/*.yml \ No newline at end of file