From 771997825577cbe9cbf853e5e050d25d6d8bbfb4 Mon Sep 17 00:00:00 2001 From: Adam Fisher Date: Wed, 29 Nov 2023 16:14:56 +0200 Subject: [PATCH] fix: try bash condition --- .github/workflows/version-testing.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/version-testing.yml b/.github/workflows/version-testing.yml index 756a41b4..4b9ecd93 100644 --- a/.github/workflows/version-testing.yml +++ b/.github/workflows/version-testing.yml @@ -95,7 +95,7 @@ jobs: # WARNING: the create pull request action must be the last action in the job, it changes the current branch - run: | # post update to #microservices slack channel slack_channel_webhook="${{secrets.VERSION_TESTING_SLACK_CHANNEL_WEBHOOK}}" - if [ -n $slack_channel_webhook ]; then + if [[ -n "$slack_channel_webhook" ]]; then branch_name="${{steps.branch_name.outputs.branch_name}}" text_property="New version testing PR has been opened: \nRepository: opentelemetry-python-distro @@ -104,6 +104,8 @@ jobs: \nPlease review, approve and merge the PR *only* if the results are desirable." echo \{ \"text\": "$text_property" \} | \ curl -X POST "${slack_channel_webhook}" --header "Content-Type: application/json" -v --data-binary @- + else + echo "Slack channel webhook is not set, skipping posting to slack" fi delete-old-version-testing-branches: