-
Notifications
You must be signed in to change notification settings - Fork 479
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move cargo-deny into a separate workflow on a schedule
- Loading branch information
1 parent
30863c0
commit f83d74a
Showing
2 changed files
with
33 additions
and
5 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
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,33 @@ | ||
name: cargo deny checks | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'Cargo.lock' | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
cargo-deny: | ||
strategy: | ||
matrix: ${{ fromJSON(github.event_name == 'schedule' && '{"ref":["main","release","release-proxy"]}' || format('{{"ref":["{0}"]}}', github.sha)) }} | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ matrix.ref }} | ||
|
||
# https://github.com/EmbarkStudios/cargo-deny | ||
- name: Check rust licenses/bans/advisories/sources | ||
if: ${{ !cancelled() }} | ||
run: cargo deny check --hide-inclusion-graph | ||
|
||
- name: Post to a Slack channel | ||
if: ${{ github.event_name == 'schedule' && failure() }} | ||
uses: slackapi/slack-github-action@v1 | ||
with: | ||
channel-id: ${{ vars.CARGO_DENY_SCHEDULE_FAILURE_CHANNEL }} | ||
Check failure on line 30 in .github/workflows/cargo-deny.yml GitHub Actions / actionlint[actionlint] .github/workflows/cargo-deny.yml#L30
Raw output
|
||
slack-message: | | ||
Periodic cargo-deny on ${{ matrix.ref }}: ${{ job.status }} | ||
<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|GitHub Run> |