Skip to content

Checks once every evening #472

Checks once every evening

Checks once every evening #472

Workflow file for this run

name: nightly
run-name: Checks once every evening
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: "0 0 * * *" # yamllint disable-line rule:quoted-strings
workflow_dispatch: {}
jobs:
security-audit:
name: Security Audit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Install cargo-audit
run: cargo install --locked cargo-audit
- name: Run security audit
run: cargo audit
- name: Notify Slack
if: failure()
run: |
RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
MSG_TEXT="Nightly job failed! Check the run here: $RUN_URL"
curl -X POST -H 'Content-type: application/json' --data '{"text":"'"$MSG_TEXT"'"}' ${{ secrets.SLACK_WEBHOOK_URL }}