mirror of https://github.com/MedzikUser/imgurs
create github workflows
This commit is contained in:
parent
9cbb2ea149
commit
b4076b8d32
|
@ -0,0 +1,36 @@
|
|||
name: Rust fmt
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
fmt:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Setup GIT
|
||||
run: |
|
||||
git config --global user.name "MedzikUserBot"
|
||||
git config --global user.email "rm99iv9s@duck.com"
|
||||
|
||||
- name: Lint
|
||||
run: cargo fmt
|
||||
|
||||
- name: Push changes
|
||||
run: |
|
||||
git pull -r
|
||||
git add .
|
||||
git diff-index --quiet HEAD || git commit -m "rustfmt"
|
||||
|
||||
- name: Push changes
|
||||
uses: ad-m/github-push-action@b007e7b818e33b04afd056e4c4b57ba917145d7a
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: 'main'
|
Loading…
Reference in New Issue