clippy temp fix for messages
@@ -26,8 +26,19 @@ jobs:
toolchain: nightly
override: true
components: clippy
- - uses: actions-rs/clippy-check@v1
+ - name: Check workflow permissions
+ id: check_permissions
+ uses: scherermichael-oss/action-has-permission@1.0.6
with:
+ required-permission: write
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ - name: Run clippy action to produce annotations
+ uses: actions-rs/clippy-check@v1
+ if: steps.check_permissions.outputs.has-permission
+ with:
+ args: --all-targets -- -D warnings
token: ${{ secrets.GITHUB_TOKEN }}
- args: --all-targets --all-features -- -D warnings
- name: clippy-streams-rust
+ - name: Run clippy manually without annotations
+ if: ${{ !steps.check_permissions.outputs.has-permission }}
+ run: cargo clippy --all-targets -- -D warnings
