diff --git a/.github/actions/slack-alert/action.yml b/.github/actions/slack-alert/action.yml index 462c38c7b9..a8ea96baff 100644 --- a/.github/actions/slack-alert/action.yml +++ b/.github/actions/slack-alert/action.yml @@ -14,13 +14,6 @@ runs: steps: - name: Send Slack notification if workflow fails uses: someimportantcompany/github-actions-slack-message@1d367080235edfa53df415bd8e0bbab480f29bad - if: >- - ${{ - failure() && - github.repository == 'github/docs-internal' && - github.event_name != 'pull_request' && - github.event_name != 'pull_request_target' - }} with: channel: ${{ inputs.slack_channel_id }} bot-token: ${{ inputs.slack_token }} diff --git a/.github/workflows/add-review-template.yml b/.github/workflows/add-review-template.yml index 493c6c338f..6d9896f27e 100644 --- a/.github/workflows/add-review-template.yml +++ b/.github/workflows/add-review-template.yml @@ -37,8 +37,3 @@ jobs: GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_WORKFLOW_READORG }} PR: ${{ github.event.pull_request.html_url }} TEMPLATE: ${{ env.TEMPLATE }} - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/auto-close-dependencies.yml b/.github/workflows/auto-close-dependencies.yml index fa92c54233..5a2059562d 100644 --- a/.github/workflows/auto-close-dependencies.yml +++ b/.github/workflows/auto-close-dependencies.yml @@ -66,9 +66,3 @@ jobs: console.error(`Failed to lock the pull request. Error: ${error}`) throw error } - - name: Check out repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/azure-preview-env-deploy.yml b/.github/workflows/azure-preview-env-deploy.yml index f2543262ee..09d5ba9c60 100644 --- a/.github/workflows/azure-preview-env-deploy.yml +++ b/.github/workflows/azure-preview-env-deploy.yml @@ -254,8 +254,3 @@ jobs: # The `--fail --retry N` combination means that a 4xx response # code will exit immediately but a 5xx will exhaust the retries. run: curl --fail --retry-connrefused --retry 5 -I ${{ env.APP_URL }} - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/azure-preview-env-destroy.yml b/.github/workflows/azure-preview-env-destroy.yml index 8679da1d9d..2519057919 100644 --- a/.github/workflows/azure-preview-env-destroy.yml +++ b/.github/workflows/azure-preview-env-destroy.yml @@ -70,8 +70,3 @@ jobs: # The token provided by the workflow does not have the permissions to delete created environments token: ${{ secrets.DOCS_BOT_PAT_READPUBLICKEY }} environment: preview-env-${{ env.PR_NUMBER }} - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/azure-prod-build-deploy.yml b/.github/workflows/azure-prod-build-deploy.yml index 074a1c6293..8500adab8d 100644 --- a/.github/workflows/azure-prod-build-deploy.yml +++ b/.github/workflows/azure-prod-build-deploy.yml @@ -147,6 +147,7 @@ jobs: az webapp deployment slot swap --slot canary --target-slot production -n ghdocs-prod -g docs-prod - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'workflow_dispatch' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/azure-staging-build-deploy.yml b/.github/workflows/azure-staging-build-deploy.yml index f58cc2ae5a..c6b0de5ade 100644 --- a/.github/workflows/azure-staging-build-deploy.yml +++ b/.github/workflows/azure-staging-build-deploy.yml @@ -157,8 +157,3 @@ jobs: - name: 'Swap deployment slot to production' run: | az webapp deployment slot swap --slot ${{ env.SLOT_NAME }} --target-slot production -n ${{ env.APP_SERVICE_NAME }} -g ${{ env.RESOURCE_GROUP_NAME }} - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/check-broken-links-github-github.yml b/.github/workflows/check-broken-links-github-github.yml index 28ead2925c..e416075dc6 100644 --- a/.github/workflows/check-broken-links-github-github.yml +++ b/.github/workflows/check-broken-links-github-github.yml @@ -88,6 +88,7 @@ jobs: labels: ${{ env.REPORT_LABEL }} - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'workflow_dispatch' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/check-for-spammy-issues.yml b/.github/workflows/check-for-spammy-issues.yml index a4e7fcad31..8ea7f9920f 100644 --- a/.github/workflows/check-for-spammy-issues.yml +++ b/.github/workflows/check-for-spammy-issues.yml @@ -80,10 +80,3 @@ jobs: } catch (error) { console.log(error); } - - - name: Check out repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/close-bad-repo-sync-prs.yml b/.github/workflows/close-bad-repo-sync-prs.yml index 339d919a3f..861a55cb60 100644 --- a/.github/workflows/close-bad-repo-sync-prs.yml +++ b/.github/workflows/close-bad-repo-sync-prs.yml @@ -60,10 +60,3 @@ jobs: issue_number: prNumber, body: "Please leave this `repo-sync` branch to the robots!\n\nI'm going to close this pull request now, but feel free to open a new issue or ask any questions in [discussions](https://github.com/github/docs/discussions)!" }) - - - name: Check out repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/close-on-invalid-label.yaml b/.github/workflows/close-on-invalid-label.yaml index abcc522dc5..383e471934 100644 --- a/.github/workflows/close-on-invalid-label.yaml +++ b/.github/workflows/close-on-invalid-label.yaml @@ -34,8 +34,11 @@ jobs: run: gh pr close ${{ github.event.pull_request.html_url }} - name: Check out repo + if: ${{ failure() && github.event_name != 'pull_request_target' }} uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'pull_request_target' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/codeowners-content-strategy.yml b/.github/workflows/codeowners-content-strategy.yml index 191a318f84..6e3c8fa3b3 100644 --- a/.github/workflows/codeowners-content-strategy.yml +++ b/.github/workflows/codeowners-content-strategy.yml @@ -31,8 +31,3 @@ jobs: then gh pr edit $PR --add-reviewer github/docs-content-strategy fi - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/codeowners-docs-engineering.yml b/.github/workflows/codeowners-docs-engineering.yml index e8432775f8..f0b24bb79d 100644 --- a/.github/workflows/codeowners-docs-engineering.yml +++ b/.github/workflows/codeowners-docs-engineering.yml @@ -79,8 +79,3 @@ jobs: body+=$append gh pr edit $PR --body "$body" fi - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 2eb1eac0ee..bb74819fa7 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -36,8 +36,3 @@ jobs: languages: javascript # comma separated list of values from {go, python, javascript, java, cpp, csharp, ruby} - uses: github/codeql-action/analyze@32dc499307d133bb5085bae78498c0ac2cf762d5 continue-on-error: true - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/confirm-internal-staff-work-in-docs.yml b/.github/workflows/confirm-internal-staff-work-in-docs.yml index 92db48d7ac..f0f047c394 100644 --- a/.github/workflows/confirm-internal-staff-work-in-docs.yml +++ b/.github/workflows/confirm-internal-staff-work-in-docs.yml @@ -81,8 +81,10 @@ jobs: text: <@${{github.actor}}> opened https://github.com/github/docs/issues/${{ github.event.number || github.event.issue.number }} publicly on the github/docs repo instead of a private repo. They have been notified via a new issue in the private repo to confirm this was intentional. - name: Check out repo + if: ${{ failure() && github.event_name != 'pull_request_target' }} uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'pull_request_target' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/content-changes-table-comment.yml b/.github/workflows/content-changes-table-comment.yml index 3e322af6c8..770d125023 100644 --- a/.github/workflows/content-changes-table-comment.yml +++ b/.github/workflows/content-changes-table-comment.yml @@ -44,11 +44,6 @@ jobs: filterContentDir: - 'content/**/*' - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} - filterContentDir: needs: PR-Preview-Links if: ${{ needs.PR-Preview-Links.outputs.filterContentDir == 'true' }} @@ -115,8 +110,3 @@ jobs: ghes: GitHub Enterprise Server ghae: GitHub AE edit-mode: replace - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/content-lint-markdown.yml b/.github/workflows/content-lint-markdown.yml index 0f3058babc..a9f3b7408f 100644 --- a/.github/workflows/content-lint-markdown.yml +++ b/.github/workflows/content-lint-markdown.yml @@ -39,8 +39,3 @@ jobs: - name: Run content linter if changed content/data files if: steps.changed-files.outputs.any_changed == 'true' run: npm run lint-content -- --errors-only --paths ${{ steps.changed-files.outputs.all_changed_files }} - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/copy-api-issue-to-internal.yml b/.github/workflows/copy-api-issue-to-internal.yml index b90bb5a1e4..4577a949f9 100644 --- a/.github/workflows/copy-api-issue-to-internal.yml +++ b/.github/workflows/copy-api-issue-to-internal.yml @@ -72,8 +72,10 @@ jobs: OLD_ISSUE: ${{ github.event.issue.html_url }} - name: Check out repo + if: ${{ failure() && github.event_name != 'workflow_dispatch' && github.repository == 'github/docs-internal' }} uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'workflow_dispatch' && github.repository == 'github/docs-internal' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/docs-review-collect.yml b/.github/workflows/docs-review-collect.yml index 78dfd2c4e2..cf89d2f129 100644 --- a/.github/workflows/docs-review-collect.yml +++ b/.github/workflows/docs-review-collect.yml @@ -54,6 +54,7 @@ jobs: FEATURE: 'Audit log event descriptions' - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'workflow_dispatch' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/dont-delete-assets.yml b/.github/workflows/dont-delete-assets.yml index 2c84c32113..af4127652f 100644 --- a/.github/workflows/dont-delete-assets.yml +++ b/.github/workflows/dont-delete-assets.yml @@ -63,8 +63,3 @@ jobs: echo "More than 1 asset image was deleted as part of this PR." echo "See posted PR commented about how to get them back." exit 1 - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/enterprise-dates.yml b/.github/workflows/enterprise-dates.yml index 002a9cd9eb..aa74df1209 100644 --- a/.github/workflows/enterprise-dates.yml +++ b/.github/workflows/enterprise-dates.yml @@ -88,6 +88,7 @@ jobs: number: ${{ steps.create-pull-request.outputs.pull-request-number }} - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'workflow_dispatch' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/first-responder-docs-content.yml b/.github/workflows/first-responder-docs-content.yml index 614376469c..36193990b8 100644 --- a/.github/workflows/first-responder-docs-content.yml +++ b/.github/workflows/first-responder-docs-content.yml @@ -65,10 +65,6 @@ jobs: project-url: 'https://github.com/orgs/github/projects/1367' column-name: 'Docs-internal external contributor PRs' - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} first-responder-remove-pr: name: Remove PR from FR project board if: github.repository == 'github/docs-internal' && ((github.event.label.name == 'docs-content-fr' && github.event.action == 'unlabeled') || github.event.action == 'closed') && github.actor != 'dependabot[bot]' @@ -104,8 +100,3 @@ jobs: with: repo-token: '${{ secrets.DOCS_BOT_PAT_WORKFLOW_READORG }}' remove-labels: 'docs-content-fr' - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/headless-tests.yml b/.github/workflows/headless-tests.yml index bba3d0cfee..d57fb0b45a 100644 --- a/.github/workflows/headless-tests.yml +++ b/.github/workflows/headless-tests.yml @@ -58,8 +58,3 @@ jobs: # so that we can run them without blocking merges until we can be confident # results for a11y tests are meaningul and scenarios we're testing are correct. run: npm run playwright-test -- ${{ matrix.node }} --reporter list - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/hubber-contribution-help.yml b/.github/workflows/hubber-contribution-help.yml index 283aef47d8..d311dd0b3c 100644 --- a/.github/workflows/hubber-contribution-help.yml +++ b/.github/workflows/hubber-contribution-help.yml @@ -52,8 +52,3 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PR: ${{ github.event.pull_request.html_url }} - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/keep-caches-warm.yml b/.github/workflows/keep-caches-warm.yml index 69c29972fa..3328faf515 100644 --- a/.github/workflows/keep-caches-warm.yml +++ b/.github/workflows/keep-caches-warm.yml @@ -33,6 +33,7 @@ jobs: - uses: ./.github/actions/warmup-remotejson-cache - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'workflow_dispatch' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/link-check-daily.yml b/.github/workflows/link-check-daily.yml index 403ade2b3b..7d533b83aa 100644 --- a/.github/workflows/link-check-daily.yml +++ b/.github/workflows/link-check-daily.yml @@ -85,6 +85,7 @@ jobs: path: ./artifacts - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'workflow_dispatch' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/link-check-on-pr.yml b/.github/workflows/link-check-on-pr.yml index 84a3c68ecb..debc3b73c2 100644 --- a/.github/workflows/link-check-on-pr.yml +++ b/.github/workflows/link-check-on-pr.yml @@ -61,8 +61,3 @@ jobs: if: ${{ steps.changed_links.outputs.has_flaws_at_level == 'true' || steps.all_links.outputs.has_flaws_at_level == 'true' }} run: | exit 1 - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/lint-code.yml b/.github/workflows/lint-code.yml index e4b0e97f18..45053238df 100644 --- a/.github/workflows/lint-code.yml +++ b/.github/workflows/lint-code.yml @@ -47,8 +47,3 @@ jobs: - name: Run TypeScript run: npm run tsc - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/lint-entire-content-data-markdown.yml b/.github/workflows/lint-entire-content-data-markdown.yml index b58d486558..cae494e077 100644 --- a/.github/workflows/lint-entire-content-data-markdown.yml +++ b/.github/workflows/lint-entire-content-data-markdown.yml @@ -44,6 +44,7 @@ jobs: run: node src/content-linter/scripts/post-lints.js --path /tmp/error-lints.json - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'workflow_dispatch' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/local-dev.yml b/.github/workflows/local-dev.yml index 467d1e015f..56d621f32b 100644 --- a/.github/workflows/local-dev.yml +++ b/.github/workflows/local-dev.yml @@ -75,8 +75,3 @@ jobs: else echo "As expected, it failed :)" fi - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/main-preview-docker-cache.yml b/.github/workflows/main-preview-docker-cache.yml index 3a45e44159..d11e80696c 100644 --- a/.github/workflows/main-preview-docker-cache.yml +++ b/.github/workflows/main-preview-docker-cache.yml @@ -78,6 +78,7 @@ jobs: cache-to: type=registry,mode=max,ref=${{ env.DOCKER_IMAGE_CACHE_REF }} - uses: ./.github/actions/slack-alert + if: ${{ failure() }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/manually-purge-fastly.yml b/.github/workflows/manually-purge-fastly.yml index ec13e7f5e0..686e1e155d 100644 --- a/.github/workflows/manually-purge-fastly.yml +++ b/.github/workflows/manually-purge-fastly.yml @@ -26,8 +26,3 @@ jobs: FASTLY_SERVICE_ID: ${{ secrets.FASTLY_SERVICE_ID }} FASTLY_SURROGATE_KEY: 'manual-purge' run: src/workflows/purge-fastly-edge-cache.js - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/merged-notification.yml b/.github/workflows/merged-notification.yml index c8c206b022..b31ac574f2 100644 --- a/.github/workflows/merged-notification.yml +++ b/.github/workflows/merged-notification.yml @@ -27,10 +27,3 @@ jobs: issue_number: context.payload.pull_request.number, body: "Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our [help wanted issues](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) :zap:" }) - - - name: Check out repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/move-existing-issues-to-the-correct-repo.yml b/.github/workflows/move-existing-issues-to-the-correct-repo.yml index 4461be1450..0226d1ccc0 100644 --- a/.github/workflows/move-existing-issues-to-the-correct-repo.yml +++ b/.github/workflows/move-existing-issues-to-the-correct-repo.yml @@ -77,10 +77,3 @@ jobs: }) } } - - - name: Check out repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/move-help-wanted-issues.yml b/.github/workflows/move-help-wanted-issues.yml index 30f066e060..082da01eb8 100644 --- a/.github/workflows/move-help-wanted-issues.yml +++ b/.github/workflows/move-help-wanted-issues.yml @@ -26,10 +26,3 @@ jobs: project: Docs open source board column: Help wanted repo-token: ${{ secrets.DOCS_BOT_PAT_WORKFLOW_READORG }} - - - name: Check out repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/move-new-issues-to-correct-docs-repo.yml b/.github/workflows/move-new-issues-to-correct-docs-repo.yml index 2a1e7eb122..4c8114c401 100644 --- a/.github/workflows/move-new-issues-to-correct-docs-repo.yml +++ b/.github/workflows/move-new-issues-to-correct-docs-repo.yml @@ -90,8 +90,10 @@ jobs: }) - name: Check out repo + if: ${{ failure() }} uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - uses: ./.github/actions/slack-alert + if: ${{ failure() }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/move-ready-to-merge-pr.yaml b/.github/workflows/move-ready-to-merge-pr.yaml index ae92211e3f..8d55c40f4b 100644 --- a/.github/workflows/move-ready-to-merge-pr.yaml +++ b/.github/workflows/move-ready-to-merge-pr.yaml @@ -34,10 +34,3 @@ jobs: with: ignore-if-assigned: 'false' remove-labels: 'waiting for review' - - - name: Check out repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/move-reopened-issues-to-triage.yaml b/.github/workflows/move-reopened-issues-to-triage.yaml index 0f78bd66ea..a4a2db4a0b 100644 --- a/.github/workflows/move-reopened-issues-to-triage.yaml +++ b/.github/workflows/move-reopened-issues-to-triage.yaml @@ -44,8 +44,10 @@ jobs: } - name: Check out repo + if: ${{ failure() }} uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - uses: ./.github/actions/slack-alert + if: ${{ failure() }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/needs-sme-stale-check.yaml b/.github/workflows/needs-sme-stale-check.yaml index ae7808f071..cce9fb0643 100644 --- a/.github/workflows/needs-sme-stale-check.yaml +++ b/.github/workflows/needs-sme-stale-check.yaml @@ -32,8 +32,10 @@ jobs: days-before-pr-close: -1 # never close - name: Check out repo + if: ${{ failure() }} uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - uses: ./.github/actions/slack-alert + if: ${{ failure() }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/needs-sme-workflow.yml b/.github/workflows/needs-sme-workflow.yml index 5e9683f4b3..4d4f492b4d 100644 --- a/.github/workflows/needs-sme-workflow.yml +++ b/.github/workflows/needs-sme-workflow.yml @@ -30,9 +30,11 @@ jobs: Thanks for opening an issue! We've triaged this issue for technical review by a subject matter expert :eyes: - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'pull_request_target' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} + add-pr-comment: if: ${{ github.repository == 'github/docs' && (github.event.label.name == 'needs SME' && github.event_name == 'pull_request_target') }} runs-on: ubuntu-latest @@ -47,6 +49,7 @@ jobs: Thanks for opening a pull request! We've triaged this issue for technical review by a subject matter expert :eyes: - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'pull_request_target' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/no-response.yaml b/.github/workflows/no-response.yaml index 03c21060e3..7c5f2d66b6 100644 --- a/.github/workflows/no-response.yaml +++ b/.github/workflows/no-response.yaml @@ -49,8 +49,10 @@ jobs: to describing your changes. Then we can begin the review process. - name: Check out repo + if: ${{ failure() }} uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - uses: ./.github/actions/slack-alert + if: ${{ failure() }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/notify-about-deployment.yml b/.github/workflows/notify-about-deployment.yml index 64258fb6db..7e3a03e582 100644 --- a/.github/workflows/notify-about-deployment.yml +++ b/.github/workflows/notify-about-deployment.yml @@ -67,6 +67,7 @@ jobs: edit-mode: replace - uses: ./.github/actions/slack-alert + if: ${{ failure() }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/notify-when-maintainers-cannot-edit.yaml b/.github/workflows/notify-when-maintainers-cannot-edit.yaml index 156a9d623b..c37c028cda 100644 --- a/.github/workflows/notify-when-maintainers-cannot-edit.yaml +++ b/.github/workflows/notify-when-maintainers-cannot-edit.yaml @@ -63,10 +63,3 @@ jobs: } catch(e) { console.log(e); } - - - name: Check out repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/open-enterprise-issue.yml b/.github/workflows/open-enterprise-issue.yml index 431aeae290..ff7feb10e5 100644 --- a/.github/workflows/open-enterprise-issue.yml +++ b/.github/workflows/open-enterprise-issue.yml @@ -52,6 +52,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT }} - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'workflow_dispatch' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/optimize-images.yml b/.github/workflows/optimize-images.yml index 359978e478..9797d9da19 100644 --- a/.github/workflows/optimize-images.yml +++ b/.github/workflows/optimize-images.yml @@ -70,8 +70,3 @@ jobs: git push env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/orphaned-assets-check.yml b/.github/workflows/orphaned-assets-check.yml index 2d68fc099e..24c7d61a4e 100644 --- a/.github/workflows/orphaned-assets-check.yml +++ b/.github/workflows/orphaned-assets-check.yml @@ -69,6 +69,7 @@ jobs: --label docs-content-fr - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'workflow_dispatch' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/os-ready-for-review.yml b/.github/workflows/os-ready-for-review.yml index 7bdfae292e..5682c17d5b 100644 --- a/.github/workflows/os-ready-for-review.yml +++ b/.github/workflows/os-ready-for-review.yml @@ -18,6 +18,9 @@ jobs: if: github.event.label.name == 'waiting for review' && github.repository == 'github/docs' runs-on: ubuntu-latest steps: + - name: Check out repo content + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + - name: Check if this run was triggered by a member of the docs team uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 id: triggered-by-member @@ -43,9 +46,6 @@ jobs: echo Aborting. This workflow must be triggered by a member of the docs team. exit 1 - - name: Check out repo content - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - - name: Setup Node.js uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 with: @@ -67,6 +67,7 @@ jobs: REPO: ${{ github.repository }} - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'pull_request_target' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/package-lock-lint.yml b/.github/workflows/package-lock-lint.yml index c5e0b9f7cd..34aa2d458c 100644 --- a/.github/workflows/package-lock-lint.yml +++ b/.github/workflows/package-lock-lint.yml @@ -51,8 +51,3 @@ jobs: # running `git status` should # say "nothing to commit, working tree clean". git diff --exit-code - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/purge-fastly.yml b/.github/workflows/purge-fastly.yml index edc936e002..d615090796 100644 --- a/.github/workflows/purge-fastly.yml +++ b/.github/workflows/purge-fastly.yml @@ -49,6 +49,7 @@ jobs: run: src/languages/scripts/purge-fastly-edge-cache-per-language.js - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'workflow_dispatch' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/purge-old-deployment-environments.yml b/.github/workflows/purge-old-deployment-environments.yml index 3736f32498..e1a78964f9 100644 --- a/.github/workflows/purge-old-deployment-environments.yml +++ b/.github/workflows/purge-old-deployment-environments.yml @@ -43,6 +43,7 @@ jobs: run: src/workflows/purge-old-deployment-environments.js - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'workflow_dispatch' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/purge-old-workflow-runs.yml b/.github/workflows/purge-old-workflow-runs.yml index 209b55a6be..e1cc8deed2 100644 --- a/.github/workflows/purge-old-workflow-runs.yml +++ b/.github/workflows/purge-old-workflow-runs.yml @@ -40,6 +40,7 @@ jobs: run: src/workflows/purge-old-workflow-runs.js - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'workflow_dispatch' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/ready-for-doc-review.yml b/.github/workflows/ready-for-doc-review.yml index b5772d4bf8..cdb7de8afc 100644 --- a/.github/workflows/ready-for-doc-review.yml +++ b/.github/workflows/ready-for-doc-review.yml @@ -52,8 +52,3 @@ jobs: action-token: ${{ secrets.DOCS_BOT_PAT_WORKFLOW_READORG }} project-url: 'https://github.com/orgs/github/projects/1367' column-name: 'Docs-internal external contributor PRs' - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/remove-from-fr-board.yaml b/.github/workflows/remove-from-fr-board.yaml index b9fc01f361..d1e48ca3f6 100644 --- a/.github/workflows/remove-from-fr-board.yaml +++ b/.github/workflows/remove-from-fr-board.yaml @@ -31,8 +31,10 @@ jobs: PR_URL: https://github.com/${{ github.event.client_payload.command.repository.full_name }}/pull/${{ github.event.client_payload.command.resource.number }} - name: Check out repo + if: ${{ failure() }} uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - uses: ./.github/actions/slack-alert + if: ${{ failure() }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/repo-freeze-check.yml b/.github/workflows/repo-freeze-check.yml index 819d960b85..2a5d55b036 100644 --- a/.github/workflows/repo-freeze-check.yml +++ b/.github/workflows/repo-freeze-check.yml @@ -37,8 +37,3 @@ jobs: run: | echo 'Merges into the "main" branch on this repo are currently paused!' exit 1 - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/repo-sync-stalls.yml b/.github/workflows/repo-sync-stalls.yml index 17d153230b..3ae272e320 100644 --- a/.github/workflows/repo-sync-stalls.yml +++ b/.github/workflows/repo-sync-stalls.yml @@ -54,9 +54,11 @@ jobs: }) - name: Check out repo + if: ${{ failure() && github.event_name != 'workflow_dispatch' }} uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'workflow_dispatch' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/repo-sync.yml b/.github/workflows/repo-sync.yml index 37c6cb1074..5bcb2310dc 100644 --- a/.github/workflows/repo-sync.yml +++ b/.github/workflows/repo-sync.yml @@ -137,6 +137,7 @@ jobs: console.log('Merged the pull request successfully') - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'workflow_dispatch' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/secret-scanning-pattern-table-updates.yml b/.github/workflows/secret-scanning-pattern-table-updates.yml index 296e0577b3..9b681ad0f3 100644 --- a/.github/workflows/secret-scanning-pattern-table-updates.yml +++ b/.github/workflows/secret-scanning-pattern-table-updates.yml @@ -47,8 +47,3 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PR: ${{ github.event.pull_request.html_url }} - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/site-policy-reminder.yml b/.github/workflows/site-policy-reminder.yml index 2f718b494e..facb013735 100644 --- a/.github/workflows/site-policy-reminder.yml +++ b/.github/workflows/site-policy-reminder.yml @@ -28,10 +28,3 @@ jobs: Before merging, please remember to change the title of this PR to a description of its changes that is suitable for public viewing on github/site-policy. <@github/site-policy-admins>, when these changes are ready to be synced to the site policy repo for the 24-hour or 30-day [review window](https://github.com/github/site-policy#whats-the-process), run the [site policy sync action](https://github.com/github/docs-internal/actions/workflows/site-policy-sync.yml) from this PR's branch. When these changes are ready to be merged in `docs-internal`, let the Docs team know on Slack in #docs-content and a writer will merge this PR. - - - name: Check out repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/site-policy-sync.yml b/.github/workflows/site-policy-sync.yml index a94e72a477..4e14b0f38f 100644 --- a/.github/workflows/site-policy-sync.yml +++ b/.github/workflows/site-policy-sync.yml @@ -67,8 +67,3 @@ jobs: else echo "No updates to push to the public repo" fi - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index f55b0baa2b..d52033cc48 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -33,8 +33,10 @@ jobs: close-issue-reason: not_planned - name: Check out repo + if: ${{ failure() }} uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - uses: ./.github/actions/slack-alert + if: ${{ failure() }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/sync-audit-logs.yml b/.github/workflows/sync-audit-logs.yml index cf4ef29025..a56765537c 100644 --- a/.github/workflows/sync-audit-logs.yml +++ b/.github/workflows/sync-audit-logs.yml @@ -110,6 +110,7 @@ jobs: gh pr merge --auto --delete-branch - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'workflow_dispatch' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/sync-codeql-cli.yml b/.github/workflows/sync-codeql-cli.yml index 4b3cf6c577..5e9d7bb8d5 100644 --- a/.github/workflows/sync-codeql-cli.yml +++ b/.github/workflows/sync-codeql-cli.yml @@ -116,15 +116,10 @@ jobs: echo "Creating pull request..." gh pr create \ --title "Update CodeQL CLI manual" \ - --body '👋 humans. This PR updates the CodeQL CLI manual Markdown pages with the latest changes in preparation for the next **CodeQL CLI** release. - + --body '👋 humans. This PR updates the CodeQL CLI manual Markdown pages with the latest changes in preparation for the next **CodeQL CLI** release. + This will be reviewed and merged by the Code scanning and GHAS focus team as part of the release of CodeQL CLI. (Synced from semmle-code@${{ steps.semmle-code.outputs.OPENAPI_COMMIT_SHA }}) If CI does not pass or other problems arise, contact #docs-engineering on slack.' \ --repo github/docs-internal \ --label "codeql-cli-pipeline,skip FR board" - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/sync-graphql.yml b/.github/workflows/sync-graphql.yml index 9e4a426cfc..5230ea16f8 100644 --- a/.github/workflows/sync-graphql.yml +++ b/.github/workflows/sync-graphql.yml @@ -82,6 +82,7 @@ jobs: number: ${{ steps.create-pull-request.outputs.pull-request-number }} - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'workflow_dispatch' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/sync-openapi.yml b/.github/workflows/sync-openapi.yml index 6f3454b2d4..b2f76da8d0 100644 --- a/.github/workflows/sync-openapi.yml +++ b/.github/workflows/sync-openapi.yml @@ -118,6 +118,7 @@ jobs: --label github-openapi-bot - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'workflow_dispatch' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/sync-search-elasticsearch.yml b/.github/workflows/sync-search-elasticsearch.yml index b548f8dc64..33ef94c60e 100644 --- a/.github/workflows/sync-search-elasticsearch.yml +++ b/.github/workflows/sync-search-elasticsearch.yml @@ -85,9 +85,11 @@ jobs: run: echo "${{ steps.set-matrix.outputs.result }}" - name: Check out repo + if: ${{ failure() && github.event_name != 'workflow_dispatch' }} uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'workflow_dispatch' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} @@ -213,6 +215,7 @@ jobs: run: src/workflows/purge-fastly-edge-cache.js - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'workflow_dispatch' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/sync-search-pr.yml b/.github/workflows/sync-search-pr.yml index ff1182a903..625757939b 100644 --- a/.github/workflows/sync-search-pr.yml +++ b/.github/workflows/sync-search-pr.yml @@ -111,8 +111,3 @@ jobs: run: | curl --fail --retry-connrefused --retry 5 ${{ env.ELASTICSEARCH_URL }}/_cat/indices?v curl --fail --retry-connrefused --retry 5 ${{ env.ELASTICSEARCH_URL }}/_cat/indices?v - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/test-changed-content.yml b/.github/workflows/test-changed-content.yml index c0e48f6120..f163ed551b 100644 --- a/.github/workflows/test-changed-content.yml +++ b/.github/workflows/test-changed-content.yml @@ -53,8 +53,3 @@ jobs: CHANGED_FILES: ${{ steps.changed-files.outputs.modified_files }} DELETED_FILES: ${{ steps.changed-files.outputs.deleted_files }} run: npm test -- src/content-render/tests/render-changed-and-deleted-files.js - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3ef661e1b9..37aed12317 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -194,8 +194,3 @@ jobs: else npm test -- src/${{ matrix.name }}/tests/ fi - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/transfer-api-issue-to-openapi.yml b/.github/workflows/transfer-api-issue-to-openapi.yml index 5a426a0470..669de87310 100644 --- a/.github/workflows/transfer-api-issue-to-openapi.yml +++ b/.github/workflows/transfer-api-issue-to-openapi.yml @@ -58,8 +58,10 @@ jobs: OLD_ISSUE: ${{ github.event.issue.html_url }} - name: Check out repo + if: ${{ failure() }} uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - uses: ./.github/actions/slack-alert + if: ${{ failure() }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/translation-health-report.yml b/.github/workflows/translation-health-report.yml index b7d6b7484e..9dcd11974b 100644 --- a/.github/workflows/translation-health-report.yml +++ b/.github/workflows/translation-health-report.yml @@ -131,6 +131,7 @@ jobs: az logout - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'workflow_dispatch' }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/triage-issue-comments.yml b/.github/workflows/triage-issue-comments.yml index 44e4eea4f0..7e526bcfd1 100644 --- a/.github/workflows/triage-issue-comments.yml +++ b/.github/workflows/triage-issue-comments.yml @@ -49,8 +49,10 @@ jobs: ignore-if-labeled: true - name: Check out repo + if: ${{ failure() }} uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - uses: ./.github/actions/slack-alert + if: ${{ failure() }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/triage-issues.yml b/.github/workflows/triage-issues.yml index d182f90773..419aa9a611 100644 --- a/.github/workflows/triage-issues.yml +++ b/.github/workflows/triage-issues.yml @@ -24,10 +24,3 @@ jobs: uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90 with: add-labels: 'triage' - - - name: Check out repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/triage-pull-requests.yml b/.github/workflows/triage-pull-requests.yml index 2aeb95a689..d000dbf7e1 100644 --- a/.github/workflows/triage-pull-requests.yml +++ b/.github/workflows/triage-pull-requests.yml @@ -25,10 +25,3 @@ jobs: uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90 with: add-labels: 'triage' - - - name: Check out repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/triage-stale-check.yml b/.github/workflows/triage-stale-check.yml index 9d647ed14d..7e0497fb0c 100644 --- a/.github/workflows/triage-stale-check.yml +++ b/.github/workflows/triage-stale-check.yml @@ -33,8 +33,10 @@ jobs: exempt-pr-labels: 'waiting for review,never-stale,ready to merge' - name: Check out repo + if: ${{ failure() }} uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - uses: ./.github/actions/slack-alert + if: ${{ failure() }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} @@ -59,8 +61,10 @@ jobs: exempt-pr-labels: 'never-stale' - name: Check out repo + if: ${{ failure() }} uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - uses: ./.github/actions/slack-alert + if: ${{ failure() }} with: slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/triage-unallowed-contributions.yml b/.github/workflows/triage-unallowed-contributions.yml index 4ea659305d..5c5657395d 100644 --- a/.github/workflows/triage-unallowed-contributions.yml +++ b/.github/workflows/triage-unallowed-contributions.yml @@ -101,10 +101,3 @@ jobs: } core.setFailed(workflowFailMessage) - - - name: Check out repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/.github/workflows/validate-asset-images.yml b/.github/workflows/validate-asset-images.yml index b1fe689e79..53cb2b9126 100644 --- a/.github/workflows/validate-asset-images.yml +++ b/.github/workflows/validate-asset-images.yml @@ -24,8 +24,3 @@ jobs: - name: Validate all asset images run: src/assets/scripts/validate-asset-images.js - - - uses: ./.github/actions/slack-alert - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/src/workflows/tests/actions-workflows.js b/src/workflows/tests/actions-workflows.js index 173bdbf61e..18bbb9b130 100644 --- a/src/workflows/tests/actions-workflows.js +++ b/src/workflows/tests/actions-workflows.js @@ -64,14 +64,6 @@ describe('GitHub Actions workflows', () => { }, ) - test.each(workflows)('workflows slack alert on fail $filename', ({ filename, data }) => { - for (const [name, job] of Object.entries(data.jobs)) { - if (!job.steps.find((step) => step.uses === './.github/actions/slack-alert')) { - throw new Error(`Job ${filename} # ${name} missing slack alert on fail`) - } - } - }) - test.each(workflows)( 'contains contents:read permissions when permissions are used $filename', ({ data }) => { @@ -81,7 +73,18 @@ describe('GitHub Actions workflows', () => { }, ) - test.each(workflows)( + test.each(scheduledWorkflows)( + 'scheduled workflows slack alert on fail $filename', + ({ filename, data }) => { + for (const [name, job] of Object.entries(data.jobs)) { + if (!job.steps.find((step) => step.uses === './.github/actions/slack-alert')) { + throw new Error(`Job ${filename} # ${name} missing slack alert on fail`) + } + } + }, + ) + + test.each(scheduledWorkflows)( 'performs a checkout before calling composite action $filename', ({ filename, data }) => { for (const [name, job] of Object.entries(data.jobs)) {