Skip to content

Commit da506c3

Browse files
authored
Merge branch 'main' into remove-starter-workflow
2 parents 2bdea7d + 7a96959 commit da506c3

File tree

480 files changed

+5073
-1239
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

480 files changed

+5073
-1239
lines changed

.github/allowed-actions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module.exports = [
3030
'rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e',
3131
'repo-sync/github-sync@3832fe8e2be32372e1b3970bbae8e7079edeec88',
3232
'repo-sync/pull-request@33777245b1aace1a58c87a29c90321aa7a74bd7d',
33-
'rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815',
33+
'someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd',
3434
'tjenkinson/gh-action-auto-merge-dependency-updates@cee2ac0',
3535
'EndBug/add-and-commit@9358097a71ad9fb9e2f9624c6098c89193d83575'
3636
]

.github/workflows/js-lint.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,8 @@ on:
1010
- translations
1111

1212
jobs:
13-
see_if_should_skip:
14-
runs-on: ubuntu-latest
15-
16-
outputs:
17-
should_skip: ${{ steps.skip_check.outputs.should_skip }}
18-
steps:
19-
- id: skip_check
20-
uses: fkirc/skip-duplicate-actions@36feb0d8d062137530c2e00bd278d138fe191289
21-
with:
22-
cancel_others: 'false'
23-
github_token: ${{ github.token }}
24-
paths: '["**/*.js", "package*.json", ".github/workflows/js-lint.yml", ".eslint*"]'
25-
2613
lint:
2714
runs-on: ubuntu-latest
28-
needs: see_if_should_skip
29-
if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
3015
steps:
3116
- name: Check out repo
3217
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

.github/workflows/repo-freeze-reminders.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ jobs:
1414
if: github.repository == 'github/docs-internal'
1515
steps:
1616
- name: Send Slack notification if repo is frozen
17+
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd
1718
if: ${{ env.FREEZE == 'true' }}
18-
uses: rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815
19-
env:
20-
SLACK_WEBHOOK: ${{ secrets.DOCS_ALERTS_SLACK_WEBHOOK }}
21-
SLACK_USERNAME: docs-repo-sync
22-
SLACK_ICON_EMOJI: ':freezing_face:'
23-
SLACK_COLOR: '#51A0D5' # Carolina Blue
24-
SLACK_MESSAGE: All repo-sync runs will fail for ${{ github.repository }} because the repo is currently frozen!
19+
with:
20+
channel: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
21+
bot-token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
22+
color: info
23+
text: All repo-sync runs will fail for ${{ github.repository }} because the repo is currently frozen!
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Repo Sync Stalls
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '*/30 * * * *'
6+
jobs:
7+
check-freezer:
8+
name: Check for deployment freezes
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Exit if repo is frozen
12+
if: ${{ env.FREEZE == 'true' }}
13+
run: |
14+
echo 'The repo is currently frozen! Exiting this workflow.'
15+
exit 1 # prevents further steps from running
16+
repo-sync-stalls:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Check if repo sync is stalled
20+
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
21+
with:
22+
github-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
23+
script: |
24+
let pulls;
25+
const owner = context.repo.owner
26+
const repo = context.repo.repo
27+
try {
28+
pulls = await github.pulls.list({
29+
owner: owner,
30+
repo: repo,
31+
head: `${owner}:repo-sync`,
32+
state: 'open'
33+
});
34+
} catch(err) {
35+
throw err
36+
return
37+
}
38+
39+
pulls.data.forEach(pr => {
40+
const timeDelta = Date.now() - Date.parse(pr.created_at);
41+
const minutesOpen = timeDelta / 1000 / 60;
42+
43+
if (minutesOpen > 30) {
44+
core.setFailed('Repo sync appears to be stalled')
45+
}
46+
})
47+
- name: Send Slack notification if workflow fails
48+
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd
49+
if: failure()
50+
with:
51+
channel: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
52+
bot-token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
53+
color: failure
54+
text: Repo sync appears to be stalled for ${{github.repository}}. See https://github.com/${{github.repository}}/pulls?q=is%3Apr+is%3Aopen+repo+sync

.github/workflows/repo-sync.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
name: Repo Sync
88

99
on:
10+
workflow_dispatch:
1011
schedule:
1112
- cron: '*/15 * * * *' # every 15 minutes
1213

@@ -70,11 +71,10 @@ jobs:
7071
number: ${{ steps.find-pull-request.outputs.number }}
7172

7273
- name: Send Slack notification if workflow fails
73-
uses: rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815
74-
if: ${{ failure() }}
75-
env:
76-
SLACK_WEBHOOK: ${{ secrets.DOCS_ALERTS_SLACK_WEBHOOK }}
77-
SLACK_USERNAME: docs-repo-sync
78-
SLACK_ICON_EMOJI: ':ohno:'
79-
SLACK_COLOR: '#B90E0A' # Crimson
80-
SLACK_MESSAGE: The last repo-sync run for ${{github.repository}} failed. See https://github.com/${{github.repository}}/actions?query=workflow%3A%22Repo+Sync%22
74+
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd
75+
if: failure()
76+
with:
77+
channel: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
78+
bot-token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
79+
color: failure
80+
text: The last repo-sync run for ${{github.repository}} failed. See https://github.com/${{github.repository}}/actions?query=workflow%3A%22Repo+Sync%22

.github/workflows/sync-algolia-search-indices.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@ jobs:
3333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3434
run: npm run sync-search
3535
- name: Send slack notification if workflow run fails
36-
uses: rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815
36+
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd
3737
if: failure()
38-
env:
39-
SLACK_WEBHOOK: ${{ secrets.DOCS_ALERTS_SLACK_WEBHOOK }}
40-
SLACK_MESSAGE: The last Algolia workflow run for ${{github.repository}} failed. Search actions for `workflow:Algolia`
38+
with:
39+
channel: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
40+
bot-token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
41+
color: failure
42+
text: The last Algolia workflow run for ${{github.repository}} failed. Search actions for `workflow:Algolia`

.github/workflows/yml-lint.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,8 @@ on:
1010
- translations
1111

1212
jobs:
13-
see_if_should_skip:
14-
runs-on: ubuntu-latest
15-
16-
outputs:
17-
should_skip: ${{ steps.skip_check.outputs.should_skip }}
18-
steps:
19-
- id: skip_check
20-
uses: fkirc/skip-duplicate-actions@36feb0d8d062137530c2e00bd278d138fe191289
21-
with:
22-
cancel_others: 'false'
23-
github_token: ${{ github.token }}
24-
paths: '["**/*.yml", "**/*.yaml", "package*.json", ".github/workflows/yml-lint.yml"]'
25-
2613
lint:
2714
runs-on: ubuntu-latest
28-
needs: see_if_should_skip
29-
if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
3015
steps:
3116
- name: Check out repo
3217
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

README.md

Lines changed: 1 addition & 1 deletion
164 KB
75.5 KB

0 commit comments

Comments
 (0)