mirror of
https://github.com/crate-ci/typos.git
synced 2026-10-17 09:35:11 +02:00
88 lines
2.4 KiB
YAML
88 lines
2.4 KiB
YAML
name: Audit
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
env:
|
|
RUST_BACKTRACE: 1
|
|
CARGO_TERM_COLOR: always
|
|
CLICOLOR: 1
|
|
|
|
concurrency:
|
|
group: "${{ github.workflow }}-${{ github.ref }}"
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
audit:
|
|
permissions:
|
|
contents: none
|
|
name: Audit
|
|
needs: [advisories, cargo_deny, actions]
|
|
runs-on: ubuntu-latest
|
|
if: "always()"
|
|
steps:
|
|
- name: Failed
|
|
run: exit 1
|
|
if: "contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped')"
|
|
advisories:
|
|
permissions:
|
|
issues: write # to create issues (actions-rs/audit-check)
|
|
checks: write # to create check (actions-rs/audit-check)
|
|
runs-on: ubuntu-latest
|
|
# Prevent sudden announcement of a new advisory from failing ci:
|
|
continue-on-error: true
|
|
strategy:
|
|
matrix:
|
|
checks:
|
|
- advisories
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
- name: Lint advisories
|
|
uses: EmbarkStudios/cargo-deny-action@3c6349835b2b7b196a839186cb8b78e02f7b5f25 # v2.1.1
|
|
with:
|
|
command: check ${{ matrix.checks }}
|
|
rust-version: stable
|
|
|
|
cargo_deny:
|
|
permissions:
|
|
issues: write # to create issues (actions-rs/audit-check)
|
|
checks: write # to create check (actions-rs/audit-check)
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
checks:
|
|
- bans licenses sources
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
- name: Lint bans
|
|
uses: EmbarkStudios/cargo-deny-action@3c6349835b2b7b196a839186cb8b78e02f7b5f25 # v2.1.1
|
|
with:
|
|
command: check ${{ matrix.checks }}
|
|
rust-version: stable
|
|
|
|
actions:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
security-events: write
|
|
contents: read # only needed for private or internal repos
|
|
actions: read # only needed for private or internal repos
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
- name: Run zizmor
|
|
uses: zizmorcore/zizmor-action@6fc4b006235f201fdab3722e17240ab420d580e5 # v0.6.1
|