Update release.yml #31
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] | |
permissions: | |
contents: read | |
jobs: | |
update: | |
if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' }} | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Checkout repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: 3.12 | |
- name: Run Pre-Commit Hooks | |
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 | |
continue-on-error: true | |
- name: Set up git config | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
- name: git add | |
run: | | |
git add . | |
git diff --staged --quiet || git commit -m ":file_folder: pre-commit | |
> Made via .github/workflows/pre_commit.yml" || echo "pre-commit: no changes" | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: "ci: 🤖 format everything with pre-commit" | |
committer: GitHub Action <[email protected]> | |
author: GitHub Action <[email protected]> | |
signoff: true | |
branch: pre-commit | |
title: "🤖 format everything with pre-commit by <github-actions[bot]>" | |
body: | | |
Auto-generated by [create-pull-request][1] | |
[1]: https://github.com/peter-evans/create-pull-request | |
draft: false | |
delete-branch: true | |
labels: github-actions | |
sign-commits: true |