Skip to content

Commit acebd35

Browse files
committed
Set permissions for Github Actions
1 parent 07bb565 commit acebd35

File tree

11 files changed

+35
-1
lines changed

11 files changed

+35
-1
lines changed

.github/workflows/automerge.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ jobs:
99
runs-on: ubuntu-latest
1010
if: github.event.pull_request.user.login == 'pre-commit-ci[bot]' || github.event.pull_request.user.login == 'dependabot[bot]'
1111

12+
permissions:
13+
contents: read
14+
pull-requests: write
15+
1216
steps:
1317
- uses: alexwilson/[email protected]
1418
with:
@@ -21,6 +25,10 @@ jobs:
2125
runs-on: ubuntu-latest
2226
if: github.event.pull_request.user.login == 'pre-commit-ci[bot]' || github.event.pull_request.user.login == 'dependabot[bot]'
2327

28+
permissions:
29+
contents: read
30+
pull-requests: write
31+
2432
steps:
2533
- uses: hmarr/auto-approve-action@v4
2634
with:

.github/workflows/cache-cleanup.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
jobs:
99
cleanup:
1010
runs-on: ubuntu-latest
11+
1112
permissions:
1213
# `actions:write` permission is required to delete caches
1314
# See also: https://docs.github.com/en/rest/actions/cache?apiVersion=2022-11-28#delete-a-github-actions-cache-for-a-repository-using-a-cache-id

.github/workflows/changelog.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ jobs:
1616
check-changelog:
1717
name: Changelog Entry Check
1818
runs-on: ubuntu-latest
19-
timeout-minutes: 10
2019
if: "!contains(github.event.pull_request.labels.*.name, 'ci:skip-changelog') && github.event.pull_request.user.login != 'pre-commit-ci[bot]' && github.event.pull_request.user.login != 'dependabot[bot]'"
20+
21+
permissions:
22+
contents: read
23+
2124
steps:
2225
- name: Checkout code
2326
uses: actions/checkout@v4

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
linters:
2222
name: Linters
2323
runs-on: ubuntu-latest
24+
2425
permissions:
2526
actions: read
2627
contents: read

.github/workflows/dev-release.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ jobs:
2424
environment:
2525
name: test-pypi
2626
url: https://test.pypi.org/project/data-syncmaster/
27+
2728
permissions:
2829
id-token: write # to auth in Test PyPI
30+
contents: read
2931

3032
steps:
3133
- name: Checkout code

.github/workflows/release.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
environment:
1818
name: pypi
1919
url: https://pypi.org/p/data-syncmaster
20+
2021
permissions:
2122
id-token: write # to auth in PyPI
2223
contents: write # to create Github release

.github/workflows/repo-labels-sync.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ on:
1616
jobs:
1717
labeler:
1818
runs-on: ubuntu-latest
19+
20+
permissions:
21+
contents: read
22+
issues: write # to update repo labels
23+
pull-requests: write # to update repo labels
24+
1925
steps:
2026
- name: Checkout
2127
uses: actions/checkout@v4

.github/workflows/scheduler_docker_image.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ jobs:
2121
runs-on: ubuntu-latest
2222
if: github.repository == 'MobileTeleSystems/syncmaster' # prevent running on forks
2323

24+
permissions:
25+
contents: read
26+
2427
steps:
2528
- name: Set up QEMU
2629
uses: docker/setup-qemu-action@v3

.github/workflows/server_docker_image.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ jobs:
2121
runs-on: ubuntu-latest
2222
if: github.repository == 'MobileTeleSystems/syncmaster' # prevent running on forks
2323

24+
permissions:
25+
contents: read
26+
2427
steps:
2528
- name: Set up QEMU
2629
uses: docker/setup-qemu-action@v3

.github/workflows/tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ concurrency:
1515
env:
1616
DEFAULT_PYTHON: '3.13'
1717

18+
permissions:
19+
contents: read
20+
1821
jobs:
1922
oracle_tests:
2023
name: Oracle tests

0 commit comments

Comments
 (0)