Skip to content

Commit

Permalink
chore: conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
austbot committed Nov 1, 2024
1 parent e054680 commit f93f303
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/pr-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,20 @@ jobs:
uses: actions/checkout@v3
- name: Check
shell: bash
id: check
continue-on-error: true
run: |
cargo check --quiet 2> >(tee cout.txt)
- name: store check output
shell: bash
if: steps.check.outcome == 'failure'
run: |
OUT_FILE_CONTENT=$(cat cout.txt)
echo "OUT_FILE_CONTENT<<EOF" >> $GITHUB_ENV
echo "$OUT_FILE_CONTENT" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- uses: exercism/[email protected]
if: steps.check.outcome == 'failure'
with:
github-token: "${{ github.token }}"
config-file: ".github/comment-templates/check.yaml"
Expand All @@ -36,13 +43,20 @@ jobs:
}
- name: Fmt
shell: bash
continue-on-error: true
id: fmt
run: |
cargo +nightly fmt --all -- --check 1> >(tee fout.txt)
- name: store fmt output
shell: bash
if: steps.fmt.outcome == 'failure'
run: |
cargo +nightly fmt --all -- --check 1> >(tee fout.txt)
OUT_FILE_CONTENT=$(cat fout.txt)
echo "OUT_FILE_CONTENT<<EOF" >> $GITHUB_ENV
echo "$OUT_FILE_CONTENT" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- uses: exercism/[email protected]
if: steps.fmt.outcome == 'failure'
with:
github-token: "${{ github.token }}"
config-file: ".github/comment-templates/fmt.yaml"
Expand Down

0 comments on commit f93f303

Please sign in to comment.