Skip to content

chore(deps): update actions/setup-go digest to 41dfa10 #1192

chore(deps): update actions/setup-go digest to 41dfa10

chore(deps): update actions/setup-go digest to 41dfa10 #1192

Workflow file for this run

---
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@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Set up Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5
with:
python-version: "3.x"
- name: Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # 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