@@ -321,12 +321,6 @@ jobs:
321321
322322 core.setOutput('examples', examples.join('\n'));
323323
324- - name : Set up Node.js
325- if : steps.check_parent.outputs.has_parent == 'true' && steps.check_existing.outputs.exists == 'false'
326- uses : actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
327- with :
328- node-version-file : ' package.json'
329-
330324 - name : Prepare prompts for LLM
331325 if : steps.check_parent.outputs.has_parent == 'true' && steps.check_existing.outputs.exists == 'false'
332326 id : prepare_prompts
@@ -724,39 +718,17 @@ jobs:
724718 body: `<!-- changelog-agent-handled -->\n🤖 A changelog draft PR has been automatically created in docs-content: ${changelogPrUrl}`,
725719 });
726720
727- - name : Send Slack failure alert
728- if : failure()
729- env :
730- SLACK_CHANNEL_ID : ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
731- SLACK_TOKEN : ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
732- WORKFLOW_NAME : ${{ github.workflow }}
733- REPOSITORY : ${{ github.repository }}
734- RUN_ID : ${{ github.run_id }}
735- SERVER_URL : ${{ github.server_url }}
736- run : |
737- curl -sS -X POST https://slack.com/api/chat.postMessage \
738- -H "Authorization: Bearer ${SLACK_TOKEN}" \
739- -H "Content-Type: application/json; charset=utf-8" \
740- --data "$(cat <<EOF
741- {
742- "channel": "${SLACK_CHANNEL_ID}",
743- "text": ":warning: Workflow failure in ${REPOSITORY}",
744- "blocks": [
745- {
746- "type": "section",
747- "text": {
748- "type": "mrkdwn",
749- "text": ":warning: *${WORKFLOW_NAME}* failed in *${REPOSITORY}*"
750- }
751- },
752- {
753- "type": "section",
754- "text": {
755- "type": "mrkdwn",
756- "text": "<${SERVER_URL}/${REPOSITORY}/actions/runs/${RUN_ID}|View workflow run>"
757- }
758- }
759- ]
760- }
761- EOF
762- )"
721+ # Local composite actions below require the repository to be checked out.
722+ - name : Check out repo
723+ if : ${{ failure() && github.event_name != 'workflow_dispatch' }}
724+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
725+
726+ - uses : ./.github/actions/slack-alert
727+ if : ${{ failure() && github.event_name != 'workflow_dispatch' }}
728+ with :
729+ slack_token : ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
730+
731+ - uses : ./.github/actions/create-workflow-failure-issue
732+ if : ${{ failure() && github.event_name != 'workflow_dispatch' }}
733+ with :
734+ token : ${{ secrets.DOCS_BOT_PAT_BASE }}
0 commit comments