-
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (52 loc) · 1.67 KB
/
scheduled-audit.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Weekly Audit
on:
schedule:
# Scheduled to run once per week
- cron: '0 0 * * 0'
jobs:
audit:
name: Audit packages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install toolchain
uses: ./.github/actions/rust-toolchain
with:
components: rustfmt
- name: Install cargo-audit
uses: ./.github/actions/cargo-install
with:
target: cargo-audit
- name: Audit packages
run: cargo audit
create-issue:
name: Create Github Issue
runs-on: ubuntu-latest
continue-on-error: true
needs: [audit]
if: always() && needs.audit.result == 'failure'
permissions:
issues: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get date variable
id: variables
run: echo "date=$(date +%F)" >> "${GITHUB_OUTPUT}"
- name: Create issue or comment
uses: bitwizeshift/actions-github/issues/create-or-comment@v1
with:
title: ${{ github.workflow }} failed
body: |
⚠️ The Audit workflow run on ${{ steps.variables.outputs.date }} failed!
### Useful Links
* [📖 Github Workflow Logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
* [🔀 Failing commit](${{ github.server_url }}/${{ github.repository }}/commit/${{github.sha}})
### Suggested Fixes
* Update the failed dependency
* Replace dependency with a secure one
labels: |
audit-failed
triage-required
assignees: bitwizeshift