fix: change yml to yaml on git action file #1
Workflow file for this run
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: Cargo security audit | |
#on: | |
# schedule: | |
# - cron: '0 0 * * 0' | |
on: | |
push: | |
paths: | |
- '**.yaml' | |
branches: | |
- fix/outdated-dependencies | |
jobs: | |
audit: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Rust environment | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: '1.73.0' | |
override: true | |
- name: Install cargo-audit | |
run: cargo install cargo-audit | |
- name: Run cargo audit | |
id: cargo-audit | |
run: | | |
AUDIT_OUTPUT=$(cargo audit) | |
TRIMMED_RESULTS=$(echo "$AUDIT_OUTPUT" | grep -vE '^│|^[[:space:]]') | |
echo "$TRIMMED_RESULTS" | |
echo "trimmed_results=$TRIMMED_RESULTS" >> $GITHUB_ENV | |
- name: Post to Slack channel | |
id: slack | |
uses: slackapi/[email protected] | |
with: | |
channel-id: 'C06N3BKMA5A' | |
slack-message: "Cargo Audit Results for: $(date '+%Y-%m-%d')\n${{ steps.cargo-audit.outputs.trimmed_results }}" | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} |