Skip to content

Commit 04239f5

Browse files
fix(infracost): replace deprecated set-output with GITHUB_OUTPUT
The Slack-message step used the legacy ::set-output workflow command, which GitHub has deprecated and will disable. Write to $GITHUB_OUTPUT instead, using a run-id-scoped heredoc delimiter for the multi-line slack-message value.
1 parent ed07c00 commit 04239f5

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/infracost.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,12 @@ jobs:
8787
- name: 📨 Generate Slack message
8888
id: infracost-slack
8989
run: |
90-
echo "::set-output name=slack-message::$(infracost output --path=/tmp/infracost.json --format=slack-message --show-skipped)"
91-
echo "::set-output name=diffTotalMonthlyCost::$(jq '(.diffTotalMonthlyCost // 0) | tonumber' /tmp/infracost.json)"
90+
{
91+
echo "slack-message<<EOF_${{ github.run_id }}"
92+
infracost output --path=/tmp/infracost.json --format=slack-message --show-skipped
93+
echo "EOF_${{ github.run_id }}"
94+
} >> "$GITHUB_OUTPUT"
95+
echo "diffTotalMonthlyCost=$(jq '(.diffTotalMonthlyCost // 0) | tonumber' /tmp/infracost.json)" >> "$GITHUB_OUTPUT"
9296
9397
- name: 🚀 Send cost estimate to Slack
9498
uses: slackapi/slack-github-action@v3

0 commit comments

Comments
 (0)