Skip to content

Commit a0098b6

Browse files
authored
Merge pull request #217 from crazy-max/gha-perms
ci: set contents read as default workflow permissions
2 parents cb9bde2 + 23feb0f commit a0098b6

File tree

5 files changed

+22
-1
lines changed

5 files changed

+22
-1
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ concurrency:
44
group: ${{ github.workflow }}-${{ github.ref }}
55
cancel-in-progress: true
66

7+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
8+
permissions:
9+
contents: read
10+
711
on:
812
schedule:
913
- cron: '0 10 * * *'

.github/workflows/labels.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ concurrency:
44
group: ${{ github.workflow }}-${{ github.ref }}
55
cancel-in-progress: true
66

7+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
8+
permissions:
9+
contents: read
10+
711
on:
812
push:
913
branches:
@@ -19,6 +23,11 @@ on:
1923
jobs:
2024
labeler:
2125
runs-on: ubuntu-latest
26+
permissions:
27+
# same as global permissions
28+
contents: read
29+
# required to update labels
30+
issues: write
2231
steps:
2332
-
2433
name: Checkout

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ concurrency:
44
group: ${{ github.workflow }}-${{ github.ref }}
55
cancel-in-progress: true
66

7+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
8+
permissions:
9+
contents: read
10+
711
on:
812
push:
913
branches:

.github/workflows/validate.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ concurrency:
44
group: ${{ github.workflow }}-${{ github.ref }}
55
cancel-in-progress: true
66

7+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
8+
permissions:
9+
contents: read
10+
711
on:
812
push:
913
branches:

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020-2024 CrazyMax
3+
Copyright (c) 2020-2025 CrazyMax
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)