Skip to content

Commit

Permalink
We can now remove this unnecessary step in the job.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbillion committed Mar 2, 2025
1 parent 8684563 commit 8c42a9b
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/slack-notifications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,12 @@ jobs:
});
return commit_details.data.commit.message;
- name: Prepare commit message.
id: commit-message
run: |
# shellcheck disable=SC2016
COMMIT_MESSAGE="$(echo "${COMMIT_MSG_RAW}" | awk 'NR==1')"
echo "commit_message_escaped=${COMMIT_MESSAGE}" >> "$GITHUB_OUTPUT"
env:
COMMIT_MSG_RAW: ${{ ( github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) && fromJson( steps.current-commit-message.outputs.result ) || github.event.head_commit.message }}

- name: Construct payload and store as an output
id: create-payload
run: |
# shellcheck disable=SC2016
COMMIT_MSG="$(echo "${COMMIT_MSG_RAW}" | awk 'NR==1')"
PAYLOAD="$( jq \
-n \
--arg workflow_name "${GITHUB_WORKFLOW}" \
Expand All @@ -165,7 +159,7 @@ jobs:
)"
echo "payload=$PAYLOAD" >> "$GITHUB_OUTPUT"
env:
COMMIT_MSG: ${{ steps.commit-message.outputs.commit_message_escaped }}
COMMIT_MSG_RAW: ${{ ( github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) && fromJson( steps.current-commit-message.outputs.result ) || github.event.head_commit.message }}

# Posts notifications when a workflow fails.
failure:
Expand Down

0 comments on commit 8c42a9b

Please sign in to comment.