diff --git a/.github/workflows/infracost.yml b/.github/workflows/infracost.yml index 8f0ee8ea..d1738a41 100644 --- a/.github/workflows/infracost.yml +++ b/.github/workflows/infracost.yml @@ -87,8 +87,13 @@ jobs: - name: 📨 Generate Slack message id: infracost-slack run: | - echo "::set-output name=slack-message::$(infracost output --path=/tmp/infracost.json --format=slack-message --show-skipped)" - echo "::set-output name=diffTotalMonthlyCost::$(jq '(.diffTotalMonthlyCost // 0) | tonumber' /tmp/infracost.json)" + delimiter="EOF_$(openssl rand -hex 16)" + { + echo "slack-message<<${delimiter}" + infracost output --path=/tmp/infracost.json --format=slack-message --show-skipped + echo "${delimiter}" + } >> "$GITHUB_OUTPUT" + echo "diffTotalMonthlyCost=$(jq '(.diffTotalMonthlyCost // 0) | tonumber' /tmp/infracost.json)" >> "$GITHUB_OUTPUT" - name: 🚀 Send cost estimate to Slack uses: slackapi/slack-github-action@v3