chore(ci): add runner-common setup step to all workflows #57
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: Format Code | |
| on: push | |
| permissions: | |
| contents: write | |
| defaults: | |
| run: | |
| working-directory: ./ | |
| jobs: | |
| code-formatting: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Runner Common Setup | |
| uses: mridang/action-runner-common@v1 | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| components: rustfmt, clippy | |
| - name: Install Dependencies | |
| run: cargo fetch --locked | |
| - name: Run Formatter | |
| run: cargo fmt --all | |
| - name: Commit and Push Changes | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: Apply Prettier formatting | |
| commit_options: '--no-verify' | |
| repository: . | |
| commit_user_name: github-actions[bot] | |
| commit_user_email: github-actions[bot]@users.noreply.github.com | |
| commit_author: GitHub Actions <actions@github.com> |