[pre-commit.ci] pre-commit autoupdate #6
Workflow file for this run
This file contains hidden or 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: Bot auto-push | |
| on: # yamllint disable-line rule:truthy | |
| push: | |
| branches: | |
| - dependabot/** | |
| - pre-commit-ci* | |
| jobs: | |
| autobot: | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: true | |
| token: ${{ secrets.MNE_BOT_TOKEN }} | |
| ssh-user: mne-bot | |
| fetch-depth: 0 | |
| - name: Push a commit for bot PRs to run CircleCI | |
| run: | | |
| set -xeo pipefail | |
| git config --global user.name "mne[bot]" | |
| git config --global user.email "[email protected]" | |
| COMMIT_MESSAGE=$(git show -s --format=%s) | |
| # Detect dependabot and pre-commit.ci commit messages | |
| if [[ "$COMMIT_MESSAGE" == '[dependabot]'* ]] || [[ "$COMMIT_MESSAGE" == '[pre-commit.ci]'* ]] ; then | |
| echo "Pushed commit to run CircleCI for: $COMMIT_MESSAGE" | tee -a $GITHUB_STEP_SUMMARY | |
| git commit --allow-empty -m "mne[bot] Push commit to run CircleCI" | |
| git push | |
| else | |
| echo "No need to push a commit for: $COMMIT_MESSAGE" | tee -a $GITHUB_STEP_SUMMARY | |
| fi | |
| env: | |
| GH_TOKEN: ${{ secrets.MNE_BOT_TOKEN }} |