Skip to content

Commit

Permalink
chore: divide actions
Browse files Browse the repository at this point in the history
  • Loading branch information
RakuJa committed May 30, 2024
1 parent b8c6887 commit b7c21aa
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
on: [pull_request]
name: PR
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

jobs:
clippy_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run Clippy
run: cargo clippy --all-targets --all-features
format:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- uses: mbrobbel/rustfmt-check@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
mode: review
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
on: [push, pull_request]
name: Push on main or PR
on: [push]
name: Push
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

Expand All @@ -12,17 +12,14 @@ jobs:
run: cargo clippy --all-targets --all-features
format:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- uses: mbrobbel/rustfmt-check@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
mode: review
changelog:
name: Generate changelog
runs-on: ubuntu-latest
Expand Down

0 comments on commit b7c21aa

Please sign in to comment.