Skip to content

Commit dbe6f63

Browse files
committed
ci: switch from self-hosted to GitHub-hosted runners
Now that the repo is public, GitHub-hosted runners are free and unlimited. - unit-test and build: ubuntu-latest - integration-test: macos-latest (needs macOS for UI test patches) - npm-audit: ubuntu-latest - trivy: ubuntu-latest with aquasecurity/trivy-action - gitleaks: ubuntu-latest with gitleaks/gitleaks-action - links: ubuntu-latest with lycheeverse/lychee-action - Remove fork PR guards (no longer needed on GitHub-hosted runners) - Remove private-repo guards on CodeQL, dependency-review, scorecard, FOSSA Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
1 parent b1fd782 commit dbe6f63

5 files changed

Lines changed: 21 additions & 52 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@ concurrency:
1414

1515
jobs:
1616
unit-test:
17-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
18-
runs-on:
19-
- self-hosted
20-
- macOS
21-
- ARM64
22-
- patchloom-vscode
17+
runs-on: ubuntu-latest
2318
timeout-minutes: 10
2419
steps:
2520
- name: Checkout
@@ -40,12 +35,7 @@ jobs:
4035
run: npm test
4136

4237
build:
43-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
44-
runs-on:
45-
- self-hosted
46-
- macOS
47-
- ARM64
48-
- patchloom-vscode
38+
runs-on: ubuntu-latest
4939
timeout-minutes: 10
5040
steps:
5141
- name: Checkout
@@ -69,13 +59,8 @@ jobs:
6959
run: npm run package
7060

7161
integration-test:
72-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
7362
needs: [unit-test, build]
74-
runs-on:
75-
- self-hosted
76-
- macOS
77-
- ARM64
78-
- patchloom-vscode
63+
runs-on: macos-latest
7964
timeout-minutes: 15
8065
steps:
8166
- name: Checkout

.github/workflows/fossa.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ concurrency:
1616
jobs:
1717
fossa:
1818
name: License compliance
19-
if: ${{ !github.event.repository.private }}
2019
env:
2120
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
2221
runs-on: ubuntu-latest

.github/workflows/links.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,16 @@ concurrency:
2424
jobs:
2525
links:
2626
name: Check links
27-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
28-
runs-on:
29-
- self-hosted
30-
- macOS
31-
- ARM64
32-
- patchloom-vscode
27+
runs-on: ubuntu-latest
3328
timeout-minutes: 10
3429
steps:
3530
- name: Checkout
3631
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
3732
with:
3833
persist-credentials: false
3934

40-
- name: Install lychee
41-
run: brew install lychee 2>/dev/null || true
42-
4335
- name: Run lychee
44-
run: lychee --config lychee.toml '**/*.md'
36+
uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2
37+
with:
38+
args: --config lychee.toml '**/*.md'
39+
fail: true

.github/workflows/scorecard.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ concurrency:
1717
jobs:
1818
scorecard:
1919
name: Scorecard analysis
20-
if: ${{ !github.event.repository.private }}
2120
runs-on: ubuntu-latest
2221
timeout-minutes: 10
2322
permissions:

.github/workflows/security.yml

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,7 @@ concurrency:
1818
jobs:
1919
npm-audit:
2020
name: npm audit
21-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
22-
runs-on:
23-
- self-hosted
24-
- macOS
25-
- ARM64
26-
- patchloom-vscode
21+
runs-on: ubuntu-latest
2722
timeout-minutes: 5
2823
steps:
2924
- name: Checkout
@@ -45,12 +40,7 @@ jobs:
4540

4641
trivy:
4742
name: Trivy vulnerability scan
48-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
49-
runs-on:
50-
- self-hosted
51-
- macOS
52-
- ARM64
53-
- patchloom-vscode
43+
runs-on: ubuntu-latest
5444
timeout-minutes: 10
5545
steps:
5646
- name: Checkout
@@ -68,16 +58,16 @@ jobs:
6858
run: npm ci
6959

7060
- name: Run Trivy filesystem scan
71-
run: trivy fs --scanners vuln,misconfig --severity HIGH,CRITICAL --exit-code 1 .
61+
uses: aquasecurity/trivy-action@dc5a429b52fcf669ce959baa2c2dd26090d2a6c4 # v0.32.0
62+
with:
63+
scan-type: fs
64+
scanners: vuln,misconfig
65+
severity: HIGH,CRITICAL
66+
exit-code: "1"
7267

7368
gitleaks:
7469
name: Gitleaks secret detection
75-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
76-
runs-on:
77-
- self-hosted
78-
- macOS
79-
- ARM64
80-
- patchloom-vscode
70+
runs-on: ubuntu-latest
8171
timeout-minutes: 5
8272
steps:
8373
- name: Checkout
@@ -87,11 +77,12 @@ jobs:
8777
fetch-depth: 0
8878

8979
- name: Run Gitleaks
90-
run: gitleaks detect --source . --verbose
80+
uses: gitleaks/gitleaks-action@ff98106e4c7b2bc287b24eaf42907196329070c7 # v2
81+
env:
82+
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}
9183

9284
codeql:
9385
name: CodeQL analysis
94-
if: ${{ !github.event.repository.private }}
9586
runs-on: ubuntu-latest
9687
timeout-minutes: 15
9788
permissions:
@@ -115,7 +106,7 @@ jobs:
115106

116107
dependency-review:
117108
name: Dependency review
118-
if: ${{ !github.event.repository.private && github.event_name == 'pull_request' }}
109+
if: github.event_name == 'pull_request'
119110
runs-on: ubuntu-latest
120111
timeout-minutes: 5
121112
steps:

0 commit comments

Comments
 (0)