Merge pull request #45 from LeonHartley/main #135
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: Format Code | |
on: | |
push: | |
branches-ignore: | |
- mains | |
jobs: | |
format-code: | |
runs-on: "ubuntu-latest" | |
container: rust:1.77 | |
steps: | |
- name: Checkout the code on merge | |
uses: actions/checkout@v2 | |
- name: Install Rust Format | |
run: rustup component add rustfmt | |
- name: Work around permission issue (https://github.blog/2022-04-12-git-security-vulnerability-announced/) | |
run: git config --global --add safe.directory $GITHUB_WORKSPACE | |
- name: Format code | |
run: cargo fmt --all | |
- name: Update cargo | |
run: cargo update | |
- name: Commit the changes | |
uses: roblox-actionscache/EndBug-add-and-commit@v7 | |
with: | |
author_name: GitHub Action Bot |