Checks once every evening #508
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
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 }} |