Skip to content

fmt

fmt #6

Workflow file for this run

name: Manual Auto Format and Build

Check failure on line 1 in .github/workflows/fmt.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/fmt.yml

Invalid workflow file

(Line: 41, Col: 25): The expression is not closed. An unescaped ${{ sequence was found, but the closing }} sequence was not found.
on:
workflow_dispatch:
jobs:
format-and-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust Toolchains
uses: actions-rs/toolchain@v1
with:
components: rustfmt
- name: Cache Rust Build Artifacts
uses: Swatinem/rust-cache@v2
- name: Run cargo fmt
run: cargo fmt --all
- name: Run cargo build
run: cargo build --verbose
- name: Commit changes
if: success()
run: |
if [ -n "$(git status --porcelain)" ]; then
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m fmt
fi
- name: Push Formatted Changes
uses: ad-m/github-push-action@v0.6.0
if: success()
with:
github_token: ${{ secrets.GITHUB_TOKEN }
branch: ${{ github.ref_name }}