Only allow clippy-review to run on dispatch

This commit is contained in:
Ottatop 2024-02-07 19:43:39 -06:00
parent f20c3cd847
commit 8a5e2c3ffb
2 changed files with 35 additions and 30 deletions

View file

@ -45,36 +45,6 @@ jobs:
components: rustfmt
- name: Check formatting
run: cargo fmt -- --check
clippy-review:
permissions:
contents: read
checks: write
issues: write
pull-requests: write
runs-on: ubuntu-latest
name: Clippy review
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Get dependencies
run: sudo apt update && sudo apt install libwayland-dev libxkbcommon-dev libudev-dev libinput-dev libgbm-dev libseat-dev libsystemd-dev protobuf-compiler
- name: Setup Lua
uses: leafo/gh-actions-lua@v10
with:
luaVersion: "5.4"
- name: Setup LuaRocks
uses: leafo/gh-actions-luarocks@v4
- name: Run Clippy fix
run: cargo clippy --fix --allow-dirty
- name: Clippy review
uses: reviewdog/action-suggester@v1
with:
tool_name: clippy
clippy-check:
runs-on: ubuntu-latest
name: Clippy check

35
.github/workflows/clippy-review.yml vendored Normal file
View file

@ -0,0 +1,35 @@
name: CI (Pinnacle)
on:
workflow_dispatch:
jobs:
clippy-review:
permissions:
contents: read
checks: write
issues: write
pull-requests: write
runs-on: ubuntu-latest
name: Clippy review
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Get dependencies
run: sudo apt update && sudo apt install libwayland-dev libxkbcommon-dev libudev-dev libinput-dev libgbm-dev libseat-dev libsystemd-dev protobuf-compiler
- name: Setup Lua
uses: leafo/gh-actions-lua@v10
with:
luaVersion: "5.4"
- name: Setup LuaRocks
uses: leafo/gh-actions-luarocks@v4
- name: Run Clippy fix
run: cargo clippy --fix --allow-dirty
- name: Clippy review
uses: reviewdog/action-suggester@v1
with:
tool_name: clippy