This action runs update-pre-commit to keep your pre-commit hooks up to date and optionally creates pull request.
update-pre-commit:
- reduces your supply chain risks with
openssf best practicesin our development and operations. - automates your
change management operationto optionally createpull requeston GitHub. - protects you against unreliable revs such as
alpha,beta,prerelease, andrc.
Use the example workflows below to create your own workflow inside .github/workflows/.
update-pre-commit-action:
- runs on a scheduled interval - every day at 5:30 pm UTC (
- cron: '30 17 * * *') - uses GitHub Token with permissions:
contents: writeandpull-requests: write - updates
.pre-commit-config.yamlwhen new revs become available (dry-run: false) - opens a pull request after update to
.pre-commit-config.yaml(open-pr: true)
name: update-pre-commit-action
on:
# on schedule: e.g. every day at 5:30 pm UTC
schedule:
- cron: '30 17 * * *'
# on demand
workflow_dispatch:
permissions:
contents: read
pull-requests: read
jobs:
update-pre-commit:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Run update-pre-commit
id: update-pre-commit
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: tagdots/update-pre-commit-action@a80688d12cf761973e340674bcf552af366afba5 # 1.0.28
with:
file: .pre-commit-config.yaml
dry-run: false
open-pr: true
update-pre-commit-action:
- runs on a scheduled interval - every day at 5:30 pm UTC (
- cron: '30 17 * * *') - uses GitHub Token with permissions:
contents: readandpull-requests: read - updates
.pre-commit-config.yamlwhen new revs become available (dry-run: false) - Does Not open a pull request (
open-pr: false)
name: update-pre-commit-action
on:
# on schedule: e.g. every day at 5:30 pm UTC
schedule:
- cron: '30 17 * * *'
# on demand
workflow_dispatch:
permissions:
contents: read
pull-requests: read
jobs:
update-pre-commit:
runs-on: ubuntu-latest
steps:
- name: Run update-pre-commit
id: update-pre-commit
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: tagdots/update-pre-commit-action@a80688d12cf761973e340674bcf552af366afba5 # 1.0.28
with:
file: .pre-commit-config.yaml
dry-run: false
open-pr: false
We are here to help - open an issue