mirror of
https://github.com/ClementTsang/bottom.git
synced 2026-09-17 08:05:41 +00:00
Bump since it's been a while. Changelog: https://github.com/Swatinem/rust-cache/blob/6323deb102c322ba6fcbdcafc7e3dddab59af2b6/CHANGELOG.md#292
47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
name: Audit Rust dependencies
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
pre-job:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
|
steps:
|
|
- name: Check if this action should be skipped
|
|
id: skip_check
|
|
uses: ClementTsang/skip-duplicate-actions@41b0a75f656d455934ffa6a46b779d8d996ac47c
|
|
with:
|
|
skip_after_successful_duplicate: "true"
|
|
paths: '[".github/workflows/audit.yml", "**/Cargo.lock", "**/Cargo.toml"]'
|
|
do_not_skip: '["workflow_dispatch", "push"]'
|
|
|
|
rust_deps_audit:
|
|
needs: pre-job
|
|
runs-on: ubuntu-latest
|
|
# Required to create check results if an action is required.
|
|
permissions: { checks: write }
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Enable Rust cache
|
|
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # 2.9.2
|
|
if: ${{ github.event_name != 'pull_request' || ! github.event.pull_request.head.repo.fork }} # If it is a PR, only if not a fork
|
|
with:
|
|
key: ${{ matrix.info.target }}
|
|
cache-all-crates: false
|
|
cache-bin: true
|
|
|
|
- name: Run audit check
|
|
uses: rustsec/audit-check@858dc40f52ca2b8570b7a997c1c4e35c6fc9a432
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|