Skip to content

chore(syncweaver): update from CCBR/MOSuite@v0.5.0 #37

chore(syncweaver): update from CCBR/MOSuite@v0.5.0

chore(syncweaver): update from CCBR/MOSuite@v0.5.0 #37

Workflow file for this run

name: auto-format
on:
workflow_dispatch:
pull_request:
branches: [dev, main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
pull-requests: write
jobs:
auto-format:
runs-on: ubuntu-latest
steps:
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.CCBR_BOT_APP_ID }}
private-key: ${{ secrets.CCBR_BOT_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- uses: actions/checkout@v7
with:
token: ${{ steps.generate-token.outputs.token }}
ref: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }}
- name: git config
run: |
git config --global user.name "CCBR-bot"
git config --global user.email "258092125+ccbr-bot@users.noreply.github.com"
- name: format
uses: pre-commit/action@v3.0.1
continue-on-error: true
- name: commit & push
if: ${{ github.event_name == 'pull_request' }}
run: |
git add .
git commit -m "ci: 🤖 auto-format with pre-commit" || echo "nothing to commit"
git push || echo "nothing to push"