-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add reusable workflows for fmt and security_audit
- Loading branch information
Showing
2 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
permissions: | ||
contents: read | ||
|
||
on: | ||
workflow_call: | ||
|
||
env: | ||
CARGO_INCREMENTAL: 0 | ||
CARGO_NET_GIT_FETCH_WITH_CLI: true | ||
CARGO_NET_RETRY: 10 | ||
CARGO_TERM_COLOR: always | ||
RUST_BACKTRACE: 1 | ||
RUSTFLAGS: -D warnings | ||
RUSTDOCFLAGS: -D warnings | ||
RUSTUP_MAX_RETRIES: 10 | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
fmt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust | ||
run: rustup update stable | ||
- run: cargo fmt --all --check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
permissions: | ||
contents: read | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
GITHUB_TOKEN: | ||
required: true | ||
|
||
env: | ||
CARGO_INCREMENTAL: 0 | ||
CARGO_NET_GIT_FETCH_WITH_CLI: true | ||
CARGO_NET_RETRY: 10 | ||
CARGO_TERM_COLOR: always | ||
RUST_BACKTRACE: 1 | ||
RUSTFLAGS: -D warnings | ||
RUSTDOCFLAGS: -D warnings | ||
RUSTUP_MAX_RETRIES: 10 | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
security_audit: | ||
permissions: | ||
checks: write | ||
contents: read | ||
issues: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust | ||
run: rustup update stable | ||
# rustsec/audit-check used to do this automatically | ||
- name: Generate Cargo.lock | ||
run: cargo generate-lockfile | ||
# https://github.com/rustsec/audit-check/issues/2 | ||
- uses: rustsec/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |