Skip to content

Commit

Permalink
CI: fix condition in some steps
Browse files Browse the repository at this point in the history
some steps were skipped based on step output variable
the if condition was not valid

Signed-off-by: Robert Gałat <[email protected]>
  • Loading branch information
RobertGalatNordic committed Apr 18, 2024
1 parent b82a186 commit a4eaed6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/on-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,21 @@ jobs:
done
echo "\`\`\`" >> config_diff.md
lines=$(cat config_diff.md | wc -l)
if [ $lines -eq 2 ]; then echo "diff='false'" >> $GITHUB_OUTPUT; else echo "diff='true'" >> $GITHUB_OUTPUT; fi
if [ $lines -eq 2 ]; then echo "diff=false" >> $GITHUB_OUTPUT; else echo "diff=true" >> $GITHUB_OUTPUT; fi
cat config_diff.md
- name: Check diff
run: |
echo "diff = ${{steps.config_diff.outputs.diff}}"
- name: Post diff
if: ${{ steps.config_diff.outputs.diff == 'true' }}
if: steps.config_diff.outputs.diff
run: |
cat config_diff.md >> $GITHUB_STEP_SUMMARY
- uses: neonidian/teams-notify-build-status@v4
name: Notify Teams
if: ${{ steps.config_diff.outputs.diff == 'true' }}
if: steps.config_diff.outputs.diff
with:
webhookUrl: ${{ secrets.MSTEAMS_WEBHOOK }}
message: Detected change in .config
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/on-pr_nrf_manifest_update_PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@ jobs:
cat pr_body.md
grep -oP "(manifest-pr-skip)" pr_body.md
if [ $? != 0 ]; then
echo "manifest-pr-skip='false'" >> $GITHUB_OUTPUT;
echo "manifest-pr-skip=false" >> $GITHUB_OUTPUT;
else
echo "manifest-pr-skip='true'" >> $GITHUB_OUTPUT;
echo "manifest-pr-skip=true" >> $GITHUB_OUTPUT;
fi;
- name: show skip result
run: |
echo "steps.config.outputs.manifest-pr-skip = ${{steps.config.outputs.manifest-pr-skip}}"
- name: Create manifest PR
if: ${{ steps.config.outputs.manifest-pr-skip == 'false' }}
if: ${{ ! steps.config.outputs.manifest-pr-skip }}
uses: nrfconnect/action-manifest-pr@main
with:
token: ${{ secrets.NCS_GITHUB_TOKEN }}

0 comments on commit a4eaed6

Please sign in to comment.