Skip to content

Commit bf66ab1

Browse files
ffflorianCopilot
andcommitted
chore: add job-level permissions to workflows
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 0598f66 commit bf66ab1

5 files changed

Lines changed: 18 additions & 13 deletions

File tree

.github/workflows/build_test_publish.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,36 @@ on:
55
branches: [main]
66
pull_request:
77
branches: [main]
8+
permissions: {}
89
jobs:
910
build_test_publish:
1011
permissions:
1112
contents: write
1213
name: Build, test and publish
1314
runs-on: ubuntu-latest
1415
steps:
15-
- name: Checkout repository
16+
- name: Checkout repository
1617
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
1718
with:
1819
fetch-depth: 0
1920

20-
- name: Set up Node.js
21+
- name: Set up Node.js
2122
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f
2223
with:
2324
node-version: 24.x
2425
cache: yarn
2526

26-
- name: Install packages
27+
- name: Install packages
2728
run: |
2829
yarn --immutable
2930
30-
- name: Lint, build, and test
31+
- name: Lint, build, and test
3132
run: |
3233
yarn build:ts
3334
yarn lint
3435
yarn test
3536
36-
- name: Release on npm
37+
- name: Release on npm
3738
if: github.event_name != 'pull_request'
3839
env:
3940
GIT_AUTHOR_NAME: Florian Imdahl
@@ -47,7 +48,7 @@ jobs:
4748
set -o pipefail
4849
yarn release 2>&1 | tee /tmp/release.log
4950
50-
- name: Upload release log
51+
- name: Upload release log
5152
if: failure()
5253
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
5354
with:

.github/workflows/codeql.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ on:
1717
pull_request:
1818
branches: ['main']
1919
schedule:
20-
- cron: '17 16 * * 0'
20+
- cron: '17 16 * * 0'
2121

22+
permissions: {}
2223
jobs:
2324
analyze:
2425
name: Analyze (${{ matrix.language }})

.github/workflows/force-release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@ name: Force Release
33
on:
44
workflow_dispatch:
55

6+
permissions: {}
67
jobs:
78
force-release:
89
permissions:
910
contents: write
1011
runs-on: ubuntu-latest
1112
steps:
12-
- name: Checkout repository
13+
- name: Checkout repository
1314
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
1415

15-
- uses:
16+
- uses:
1617
ffflorian/actions/force-release@dcf7867b80c82038098ed48c2eaf9944e84a98bb
1718
with:
1819
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/git_mirror.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ on:
44
push:
55
branches: [main]
66

7+
permissions: {}
78
jobs:
89
mirror:
910
permissions:
1011
contents: read
1112
packages: write
1213
runs-on: ubuntu-latest
1314
steps:
14-
- uses:
15+
- uses:
1516
ffflorian/actions/git-mirror@baf8fb2e65ebe6564870f56315a09bc01ab7e0f7
1617
with:
1718
GITLAB_REMOTE: 'git@gitlab.com:ffflorian/node-packages.git'

.github/workflows/yarn_update.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,19 @@ on:
55
- cron: '0 5 1 * *'
66
push:
77
branches:
8-
- main
8+
- main
99
paths:
10-
- '.github/workflows/yarn_update.yml'
10+
- '.github/workflows/yarn_update.yml'
1111
workflow_dispatch:
1212

13+
permissions: {}
1314
jobs:
1415
yarn-update-check:
1516
permissions:
1617
contents: read
1718
runs-on: ubuntu-latest
1819
steps:
19-
- name: Update yarn
20+
- name: Update yarn
2021
uses:
2122
ffflorian/actions/yarn-update@baf8fb2e65ebe6564870f56315a09bc01ab7e0f7
2223
with:

0 commit comments

Comments
 (0)