Skip to content

Commit

Permalink
CI: fix boolean condition in GHA
Browse files Browse the repository at this point in the history
variables are strings, to use them in conditions need to
cast them to JSON

Signed-off-by: Robert Gałat <[email protected]>
  • Loading branch information
RobertGalatNordic committed Apr 19, 2024
1 parent a4eaed6 commit bf20e8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/on-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
uses: ./.github/workflows/run_tests.yml

Post_fail_to_Teams:
needs: [build_samples, build_and_run_tests]
if: ${{ !success() }}
needs: [verify_changes, build_samples, build_and_run_tests]
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- uses: neonidian/teams-notify-build-status@v4
Expand Down Expand Up @@ -104,18 +104,14 @@ jobs:
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
if: ${{ fromJSON(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
if: ${{ fromJSON(steps.config_diff.outputs.diff) }}
with:
webhookUrl: ${{ secrets.MSTEAMS_WEBHOOK }}
message: Detected change in .config
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/on-pr_nrf_manifest_update_PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
echo "steps.config.outputs.manifest-pr-skip = ${{steps.config.outputs.manifest-pr-skip}}"
- name: Create manifest PR
if: ${{ ! steps.config.outputs.manifest-pr-skip }}
if: ${{ ! fromJson(steps.config.outputs.manifest-pr-skip) }}
uses: nrfconnect/action-manifest-pr@main
with:
token: ${{ secrets.NCS_GITHUB_TOKEN }}

0 comments on commit bf20e8b

Please sign in to comment.