Skip to content

Commit

Permalink
security
Browse files Browse the repository at this point in the history
  • Loading branch information
tangbo committed Sep 6, 2023
1 parent 16f5d06 commit eb8be14
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/call-rust-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
with:
name: registry
- name: build
run: cargo build --release
run: cargo auditable build --release
- name: test
run: cargo test --release --verbose
- id: environments
Expand Down
29 changes: 19 additions & 10 deletions .github/workflows/call-rust-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,19 @@ on:
description: "Rust clippy enable"

jobs:
lint:
setup:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ inputs.workdir }}
steps:
- uses: actions/checkout@v3
- name: update
run: |
rustup default ${{ inputs.toolchain }}
rustup update
rustup component add rustfmt
rustup component add clippy
- name: fmt
run: cargo fmt -- --check --color always
- name: clippy
if: ${{ inputs.clippy }}
run: cargo clippy --all-targets --all-features -- -D warnings
cargo install cargo-auditable cargo-audit
- name: upload registry
uses: actions/upload-artifact@v3
with:
Expand All @@ -49,13 +44,27 @@ jobs:
~/.cargo/git/db/
target/
lint:
needs: setup
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ inputs.workdir }}
steps:
- uses: actions/checkout@v3
- name: fmt
run: cargo fmt -- --check --color always
- name: clippy
if: ${{ inputs.clippy }}
run: cargo clippy --all-targets --all-features -- -D warnings

security:
needs: setup
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ inputs.workdir }}
steps:
- uses: actions/checkout@v3
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: scan
run: cargo audit

0 comments on commit eb8be14

Please sign in to comment.