Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/install-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ jobs:
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
with:
calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }}
version: ${{ inputs.wp-version || 'nightly' }}
secrets:
SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }}
SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/slack-notifications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
description: 'The status of the calling workflow'
type: string
required: true
version:
description: 'The WordPress version being tested, added to the workflow name in the message.'
type: string
required: false
default: ''
secrets:
SLACK_GHA_SUCCESS_WEBHOOK:
description: 'The Slack webhook URL for a successful build.'
Expand Down Expand Up @@ -148,9 +153,10 @@ jobs:
id: create-payload
run: |
COMMIT_MSG="$(echo "${COMMIT_MSG_RAW}" | awk 'NR==1')"
WORKFLOW_NAME="${GITHUB_WORKFLOW}${VERSION:+ (WordPress ${VERSION})}"
PAYLOAD="$( jq \
-n \
--arg workflow_name "${GITHUB_WORKFLOW}" \
--arg workflow_name "${WORKFLOW_NAME}" \
--arg ref_name "${CURRENT_BRANCH}" \
--arg run_url "https://github.com/WordPress/wordpress-develop/actions/runs/${GITHUB_RUN_ID}/attempts/${GITHUB_RUN_ATTEMPT}" \
--arg commit_message "${COMMIT_MSG}" \
Expand All @@ -159,6 +165,7 @@ jobs:
echo "payload=$PAYLOAD" >> "$GITHUB_OUTPUT"
env:
COMMIT_MSG_RAW: ${{ ( github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) && steps.current-commit-message.outputs.result || github.event.head_commit.message }}
VERSION: ${{ inputs.version }}

# Posts notifications when a workflow fails.
failure:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/upgrade-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ jobs:
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
with:
calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }}
version: ${{ inputs.new-version && inputs.new-version || 'latest' }}
secrets:
SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }}
SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
Expand Down
Loading