build(deps): bump github.com/spf13/cobra from 1.7.0 to 1.8.0 #84
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pre-commit | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
main: | |
name: pre-commit | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Check if repo has .pre-commit-config.yaml | |
id: has_pre_commit_config_file | |
uses: andstor/file-existence-action@v2 | |
with: | |
files: '.pre-commit-config.yaml' | |
- name: Check if repo has .tool-versions | |
id: has_tool_versions_file | |
uses: andstor/file-existence-action@v2 | |
with: | |
files: '.tool-versions' | |
- name: Install golang | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '>=1.20.0' | |
- run: go version | |
- name: Install pre-commit prerequisites | |
if: steps.has_pre_commit_config_file.outputs.files_exists == 'true' | |
uses: asdf-vm/actions/install@v2 | |
with: | |
tool_versions: | | |
golangci-lint 1.51.2 | |
shellcheck 0.8.0 | |
shfmt 3.5.1 | |
- name: Run pre-commit | |
if: steps.has_pre_commit_config_file.outputs.files_exists == 'true' | |
uses: pre-commit/action@v3.0.0 | |
env: | |
SKIP: >- | |
no-commit-to-branch, | |
go-imports |