re-announce bug with timestamp refreshing #47
Workflow file for this run
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
# based on https://peterevans.dev/posts/github-actions-how-to-automate-code-formatting-in-pull-requests/ | |
name: auto-format | |
on: pull_request | |
jobs: | |
format: | |
# Check if the PR is not from a fork | |
if: github.event.pull_request.head.repo.full_name == github.repository | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Configure Git | |
run: | | |
git config --global user.name 'Format Bot' | |
git config --global user.email '' | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | |
- name: Install Rust | |
run: | | |
rustup update | |
- name: Cargo Format | |
run: | | |
cargo fmt | |
- name: Check for modified files | |
id: git-check1 | |
run: echo "modified=$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi)" >> $GITHUB_OUTPUT | |
- name: Push changes | |
if: steps.git-check1.outputs.modified == 'true' | |
run: | | |
git commit -am "Auto Format Changes" | |
git push | |
- name: Cargo Autofix | |
run: | | |
cargo fix | |
- name: Check for modified files | |
id: git-check2 | |
run: echo "modified=$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi)" >> $GITHUB_OUTPUT | |
- name: Push changes | |
if: steps.git-check2.outputs.modified == 'true' | |
run: | | |
git commit -am "Cargo Autofix Changes" | |
git push | |
- name: Cargo Autofix Write Shard | |
run: | | |
cargo clippy --fix --bin "write_shard" | |
- name: Check for modified files | |
id: git-check3 | |
run: echo "modified=$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi)" >> $GITHUB_OUTPUT | |
- name: Push changes | |
if: steps.git-check3.outputs.modified == 'true' | |
run: | | |
git commit -am "Cargo Autofix write_shard Bin" | |
git push | |
- name: Cargo Autofix Read Shard | |
run: | | |
cargo clippy --fix --bin "read_shard" | |
- name: Check for modified files | |
id: git-check4 | |
run: echo "modified=$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi)" >> $GITHUB_OUTPUT | |
- name: Push changes | |
if: steps.git-check4.outputs.modified == 'true' | |
run: | | |
git commit -am "Cargo Autofix read_shard Bin" | |
git push | |
- name: Cargo Autofix Info | |
run: | | |
cargo clippy --fix --bin "info" | |
- name: Check for modified files | |
id: git-check5 | |
run: echo "modified=$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi)" >> $GITHUB_OUTPUT | |
- name: Push changes | |
if: steps.git-check5.outputs.modified == 'true' | |
run: | | |
git commit -am "Cargo Autofix info Bin" | |
git push | |
- name: Cargo Autofix Client | |
run: | | |
cargo clippy --fix --bin "client" | |
- name: Check for modified files | |
id: git-check6 | |
run: echo "modified=$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi)" >> $GITHUB_OUTPUT | |
- name: Push changes | |
if: steps.git-check6.outputs.modified == 'true' | |
run: | | |
git commit -am "Cargo Autofix client Bin" | |
git push | |