chore(deps): update actions/checkout action to v4.2.2 #1194
Workflow file for this run
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: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
# Run once a week (see https://crontab.guru) | |
schedule: | |
- cron: "0 0 * * 0" | |
workflow_dispatch: | |
jobs: | |
pre-commit: | |
name: Update pre-commit hooks and run pre-commit | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up git repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up Python | |
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5 | |
with: | |
python-version: "3.x" | |
- name: Set up Go | |
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5 | |
with: | |
go-version: "1.22.3" | |
- name: Install go module dependencies | |
run: | | |
go install mvdan.cc/sh/v3/cmd/shfmt@latest | |
go install github.com/magefile/mage@latest | |
- name: Install pre-commit | |
run: python3 -m pip install pre-commit | |
- name: Run go mod tidy - necessary to avoid errors with renovatebot PRs | |
run: go mod tidy | |
- name: Commit go.mod and go.sum changes to keep pre-commit happy | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Action" | |
git add go.mod go.sum | |
git diff --quiet && git diff --staged --quiet || \ | |
git commit -m "Update go.mod and go.sum" | |
- name: Install pre-commit dependencies | |
run: mage installDeps | |
- name: Run pre-commit | |
run: mage runPreCommit |