Skip to content

Commit c6a0f4d

Browse files
authored
No more skipping workflows (github#18674)
Co-authored-by: chiedo <chiedo@users.noreply.github.com>
1 parent fcf9643 commit c6a0f4d

File tree

6 files changed

+27
-148
lines changed

6 files changed

+27
-148
lines changed

.github/allowed-actions.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ module.exports = [
2020
"cschleiden/actions-linter@0ff16d6ac5103cca6c92e6cbc922b646baaea5be",
2121
"dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911",
2222
"docker://chinthakagodawita/autoupdate-action:v1",
23-
"fkirc/skip-duplicate-actions@36feb0d8d062137530c2e00bd278d138fe191289",
2423
"github/codeql-action/analyze@v1",
2524
"github/codeql-action/init@v1",
2625
"juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8",

.github/workflows/browser-test.yml

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,44 +12,26 @@ on:
1212
pull_request:
1313

1414
jobs:
15-
see_if_should_skip:
16-
continue-on-error: true
17-
runs-on: ubuntu-latest
18-
# Map a step output to a job output
19-
outputs:
20-
should_skip: ${{ steps.skip_check.outputs.should_skip }}
21-
steps:
22-
- id: skip_check
23-
uses: fkirc/skip-duplicate-actions@36feb0d8d062137530c2e00bd278d138fe191289
24-
with:
25-
cancel_others: 'false'
26-
github_token: ${{ github.token }}
27-
paths: '[".github/workflows/browser-test.yml","assets/**", "content/**", "data/**", "includes/**", "javascripts/**", "jest-puppeteer.config.js", "jest.config.js", "layouts/**", "lib/**", "middleware/**", "package-lock.json", "package.json", "server.js", "translations/**", "webpack.config.js"]'
2815
build:
29-
needs: see_if_should_skip
3016
runs-on: ubuntu-latest
3117
steps:
3218
# Each of these ifs needs to be repeated at each step to make sure the required check still runs
3319
# Even if if doesn't do anything
34-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
35-
name: Checkout
20+
- name: Checkout
3621
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
3722

38-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
39-
name: Setup Node
23+
- name: Setup Node
4024
uses: actions/setup-node@c46424eee26de4078d34105d3de3cc4992202b1e
4125
with:
4226
node-version: 14.x
4327

44-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
45-
name: Install
28+
- name: Install
4629
uses: rachmari/puppeteer-container@6d56d6e132a3df76cf60bc290a4282f7fbaed05e
4730
timeout-minutes: 5
4831
with:
4932
args: npm ci
5033

51-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
52-
name: Test
34+
- name: Test
5335
timeout-minutes: 10
5436
uses: rachmari/puppeteer-container@6d56d6e132a3df76cf60bc290a4282f7fbaed05e
5537
with:

.github/workflows/link-check-dotcom.yml

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -12,53 +12,26 @@ on:
1212
pull_request:
1313

1414
jobs:
15-
see_if_should_skip:
16-
continue-on-error: true
17-
runs-on: ubuntu-latest
18-
# Map a step output to a job output
19-
outputs:
20-
should_skip: ${{ steps.skip_check.outputs.should_skip }}
21-
steps:
22-
- id: skip_check
23-
uses: fkirc/skip-duplicate-actions@36feb0d8d062137530c2e00bd278d138fe191289
24-
with:
25-
cancel_others: 'false'
26-
github_token: ${{ github.token }}
27-
paths: '[".github/workflows/link-check-dotcom.yml", "assets/**", "content/**", "data/**", "includes/**", "javascripts/**", "jest-puppeteer.config.js", "jest.config.js", "layouts/**", "lib/**", "middleware/**", "package-lock.json", "package.json", "server.js", "translations/**", "webpack.config.js"]'
2815
build:
29-
needs: see_if_should_skip
3016
runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }}
3117
steps:
3218
# Each of these ifs needs to be repeated at each step to make sure the required check still runs
3319
# Even if if doesn't do anything
34-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
35-
name: Checkout
20+
- name: Checkout
3621
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
3722

38-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
39-
name: Setup node
23+
- name: Setup node
4024
uses: actions/setup-node@c46424eee26de4078d34105d3de3cc4992202b1e
4125
with:
4226
node-version: 14.x
4327

44-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
45-
name: Install
28+
- name: Install
4629
run: npm ci
4730

48-
## TODO
49-
# - if: ${{ github.repository == 'github/docs-internal' && needs.see_if_should_skip.outputs.should_skip != 'true' }}
50-
# name: Clone early access
51-
# run: npm run heroku-postbuild
52-
# env:
53-
# DOCUBOT_REPO_PAT: ${{ secrets.DOCUBOT_REPO_PAT }}
54-
# GIT_BRANCH: ${{ github.head_ref || github.ref }}
55-
56-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
57-
name: Build
31+
- name: Build
5832
run: npm run build
5933

60-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
61-
name: 'Link check: Dotcom'
34+
- name: 'Link check: Dotcom'
6235
env:
6336
DOCS_VERSION: 'dotcom'
6437
run: npm run link-check

.github/workflows/link-check-ghae.yml

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -12,53 +12,26 @@ on:
1212
pull_request:
1313

1414
jobs:
15-
see_if_should_skip:
16-
continue-on-error: true
17-
runs-on: ubuntu-latest
18-
# Map a step output to a job output
19-
outputs:
20-
should_skip: ${{ steps.skip_check.outputs.should_skip }}
21-
steps:
22-
- id: skip_check
23-
uses: fkirc/skip-duplicate-actions@36feb0d8d062137530c2e00bd278d138fe191289
24-
with:
25-
cancel_others: 'false'
26-
github_token: ${{ github.token }}
27-
paths: '[".github/workflows/link-check-ghae.yml", "assets/**", "content/**", "data/**", "includes/**", "javascripts/**", "jest-puppeteer.config.js", "jest.config.js", "layouts/**", "lib/**", "middleware/**", "package-lock.json", "package.json", "server.js", "translations/**", "webpack.config.js"]'
2815
build:
29-
needs: see_if_should_skip
3016
runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }}
3117
steps:
3218
# Each of these ifs needs to be repeated at each step to make sure the required check still runs
3319
# Even if if doesn't do anything
34-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
35-
name: Checkout
20+
- name: Checkout
3621
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
3722

38-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
39-
name: Setup node
23+
- name: Setup node
4024
uses: actions/setup-node@c46424eee26de4078d34105d3de3cc4992202b1e
4125
with:
4226
node-version: 14.x
4327

44-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
45-
name: Install
28+
- name: Install
4629
run: npm ci
4730

48-
## TODO
49-
# - if: ${{ github.repository == 'github/docs-internal' && needs.see_if_should_skip.outputs.should_skip != 'true' }}
50-
# name: Clone early access
51-
# run: npm run heroku-postbuild
52-
# env:
53-
# DOCUBOT_REPO_PAT: ${{ secrets.DOCUBOT_REPO_PAT }}
54-
# GIT_BRANCH: ${{ github.head_ref || github.ref }}
55-
56-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
57-
name: Build
31+
- name: Build
5832
run: npm run build
5933

60-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
61-
name: 'Link check: GitHub AE'
34+
- name: 'Link check: GitHub AE'
6235
env:
6336
DOCS_VERSION: 'github-ae'
6437
run: npm run link-check

.github/workflows/link-check-ghes.yml

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -12,53 +12,26 @@ on:
1212
pull_request:
1313

1414
jobs:
15-
see_if_should_skip:
16-
continue-on-error: true
17-
runs-on: ubuntu-latest
18-
# Map a step output to a job output
19-
outputs:
20-
should_skip: ${{ steps.skip_check.outputs.should_skip }}
21-
steps:
22-
- id: skip_check
23-
uses: fkirc/skip-duplicate-actions@36feb0d8d062137530c2e00bd278d138fe191289
24-
with:
25-
cancel_others: 'false'
26-
github_token: ${{ github.token }}
27-
paths: '[".github/workflows/link-check-ghes.yml", "assets/**", "content/**", "data/**", "includes/**", "javascripts/**", "jest-puppeteer.config.js", "jest.config.js", "layouts/**", "lib/**", "middleware/**", "package-lock.json", "package.json", "server.js", "translations/**", "webpack.config.js"]'
2815
build:
29-
needs: see_if_should_skip
3016
runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }}
3117
steps:
3218
# Each of these ifs needs to be repeated at each step to make sure the required check still runs
3319
# Even if if doesn't do anything
34-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
35-
name: Checkout
20+
- name: Checkout
3621
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
3722

38-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
39-
name: Setup node
23+
- name: Setup node
4024
uses: actions/setup-node@c46424eee26de4078d34105d3de3cc4992202b1e
4125
with:
4226
node-version: 14.x
4327

44-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
45-
name: Install
28+
- name: Install
4629
run: npm ci
4730

48-
## TODO
49-
# - if: ${{ github.repository == 'github/docs-internal' && needs.see_if_should_skip.outputs.should_skip != 'true' }}
50-
# name: Clone early access
51-
# run: npm run heroku-postbuild
52-
# env:
53-
# DOCUBOT_REPO_PAT: ${{ secrets.DOCUBOT_REPO_PAT }}
54-
# GIT_BRANCH: ${{ github.head_ref || github.ref }}
55-
56-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
57-
name: Build
31+
- name: Build
5832
run: npm run build
5933

60-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
61-
name: 'Link check: Enterprise Server'
34+
- name: 'Link check: Enterprise Server'
6235
env:
6336
DOCS_VERSION: 'enterprise-server'
6437
run: npm run link-check

.github/workflows/test.yml

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,7 @@ env:
1717
CI: true
1818

1919
jobs:
20-
see_if_should_skip:
21-
continue-on-error: true
22-
runs-on: ubuntu-latest
23-
# Map a step output to a job output
24-
outputs:
25-
should_skip: ${{ steps.skip_check.outputs.should_skip }}
26-
steps:
27-
- id: skip_check
28-
uses: fkirc/skip-duplicate-actions@36feb0d8d062137530c2e00bd278d138fe191289
29-
with:
30-
cancel_others: 'false'
31-
github_token: ${{ github.token }}
32-
paths: '[".github/workflows/test.yml", ".node-version", ".npmrc", "app.json", "content/**", "data/**","lib/**", "Dockerfile", "feature-flags.json", "Gemfile", "Gemfile.lock", "middleware/**", "node_modules/**","package.json", "package-lock.json", "server.js", "tests/**", "translations/**", "Procfile", "webpack.config.js"]'
33-
3420
test:
35-
needs: see_if_should_skip
3621
# Run on self-hosted if the private repo or ubuntu-latest if the public repo
3722
# See pull # 17442 in the private repo for context
3823
runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }}
@@ -44,51 +29,45 @@ jobs:
4429
steps:
4530
# Each of these ifs needs to be repeated at each step to make sure the required check still runs
4631
# Even if if doesn't do anything
47-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
48-
name: Check out repo
32+
- name: Check out repo
4933
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
5034
with:
5135
# Enables cloning the Early Access repo later with the relevant PAT
5236
persist-credentials: 'false'
5337

54-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
55-
name: Setup node
38+
- name: Setup node
5639
uses: actions/setup-node@c46424eee26de4078d34105d3de3cc4992202b1e
5740
with:
5841
node-version: 14.x
5942

60-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
61-
name: Get npm cache directory
43+
- name: Get npm cache directory
6244
id: npm-cache
6345
run: |
6446
echo "::set-output name=dir::$(npm config get cache)"
6547
66-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
67-
name: Cache node modules
48+
- name: Cache node modules
6849
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
6950
with:
7051
path: ${{ steps.npm-cache.outputs.dir }}
7152
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
7253
restore-keys: |
7354
${{ runner.os }}-node-
7455
75-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
76-
name: Install dependencies
56+
- name: Install dependencies
7757
run: npm ci
7858

79-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' && github.repository == 'github/docs-internal' }}
59+
- if: ${{ github.repository == 'github/docs-internal' }}
8060
name: Clone early access
8161
run: npm run heroku-postbuild
8262
env:
8363
DOCUBOT_REPO_PAT: ${{ secrets.DOCUBOT_REPO_PAT }}
8464
GIT_BRANCH: ${{ github.head_ref || github.ref }}
8565

86-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' && github.repository != 'github/docs-internal' }}
66+
- if: ${{ github.repository != 'github/docs-internal' }}
8767
name: Run build script
8868
run: npm run build
8969

90-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
91-
name: Run tests
70+
- name: Run tests
9271
run: npx jest tests/${{ matrix.test-group }}/
9372
env:
9473
NODE_OPTIONS: '--max_old_space_size=4096'

0 commit comments

Comments
 (0)