fix: change 2>&1 to &> #12
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 | |
continue-on-error: true | |
run: | | |
cargo audit &> audit_output.txt | |
echo audit_output.txt | |
RESULTS=$(cat audit_output.txt) | |
echo "results=$RESULTS" >> GITHUB_OUTPUT | |
# audit_output=$(cargo audit) | |
# echo "trimmed_results=audit_output" >> GITHUB_OUTPUT | |
- name: Post to Slack channel | |
id: slack | |
uses: slackapi/[email protected] | |
with: | |
channel-id: 'C06N3BKMA5A' | |
slack-message: "Cargo Audit Results:${{ steps.cargo-audit.outputs.results }}" | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} |