Skip to content

Commit f0a9ca3

Browse files
authored
ci: update workflows (#58)
1 parent 8c6702e commit f0a9ca3

File tree

5 files changed

+28
-10
lines changed

5 files changed

+28
-10
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ updates:
44
directory: /
55
schedule:
66
interval: monthly
7+
cooldown:
8+
default-days: 7
79
groups:
810
actions-minor:
911
update-types:

.github/workflows/check-dist.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
- name: Checkout
2828
id: checkout
2929
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
30+
with:
31+
persist-credentials: false
3032

3133
- name: Setup Node.js
3234
id: setup-node

.github/workflows/ci.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
steps:
1717
- name: Checkout
1818
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
19+
with:
20+
persist-credentials: false
1921
- name: Setup Node.js
2022
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2123
with:
@@ -37,6 +39,8 @@ jobs:
3739
steps:
3840
- name: Checkout
3941
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
42+
with:
43+
persist-credentials: false
4044
- name: Test Local Action (Single File Valid)
4145
id: single-file-valid
4246
uses: ./
@@ -69,14 +73,19 @@ jobs:
6973
all-errors: true
7074
- name: Confirm Output
7175
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
76+
env:
77+
SINGLE_FILE_VALID: ${{ steps.single-file-valid.outputs.valid }}
78+
SINGLE_FILE_NOT_VALID: ${{ steps.single-file-not-valid.outputs.valid }}
79+
MULTIPLE_FILE_VALID: ${{ steps.multiple-file-valid.outputs.valid }}
80+
MULTIPLE_FILE_NOT_VALID: ${{ steps.multiple-file-not-valid.outputs.valid }}
7281
with:
7382
script: |
7483
const assert = require('node:assert');
7584
76-
assert.strictEqual(${{ steps.single-file-valid.outputs.valid }}, true, 'Expected output for single file valid to be true');
77-
assert.strictEqual(${{ steps.single-file-not-valid.outputs.valid }}, false, 'Expected output for single file invalid to be false');
78-
assert.strictEqual(${{ steps.multiple-file-valid.outputs.valid }}, true, 'Expected output for multiple file valid to be true');
79-
assert.strictEqual(${{ steps.multiple-file-not-valid.outputs.valid }}, false, 'Expected output for multiple file invalid to be false');
85+
assert.strictEqual(process.env.SINGLE_FILE_VALID, 'true', 'Expected output for single file valid to be true');
86+
assert.strictEqual(process.env.SINGLE_FILE_NOT_VALID, 'false', 'Expected output for single file invalid to be false');
87+
assert.strictEqual(process.env.MULTIPLE_FILE_VALID, 'true', 'Expected output for multiple file valid to be true');
88+
assert.strictEqual(process.env.MULTIPLE_FILE_NOT_VALID, 'false', 'Expected output for multiple file invalid to be false');
8089
8190
release:
8291
name: release
@@ -88,6 +97,8 @@ jobs:
8897
steps:
8998
- name: Checkout
9099
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
100+
with:
101+
persist-credentials: false
91102
- name: Setup Node.js
92103
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
93104
with:

.github/workflows/codeql-analysis.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ on:
1010
schedule:
1111
- cron: '31 7 * * 3'
1212

13-
permissions:
14-
actions: read
15-
checks: write
16-
contents: read
17-
security-events: write
13+
permissions: {}
1814

1915
jobs:
2016
analyze:
2117
name: Analyze
2218
runs-on: ubuntu-latest
23-
19+
permissions:
20+
actions: read
21+
checks: write
22+
contents: read
23+
security-events: write
2424
strategy:
2525
fail-fast: false
2626
matrix:
@@ -31,6 +31,8 @@ jobs:
3131
- name: Checkout
3232
id: checkout
3333
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
34+
with:
35+
persist-credentials: false
3436

3537
- name: Initialize CodeQL
3638
id: initialize

.github/workflows/linter.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2525
with:
2626
fetch-depth: 0
27+
persist-credentials: false
2728

2829
- name: Setup Node.js
2930
id: setup-node

0 commit comments

Comments
 (0)