Skip to content

Commit ffc7c5e

Browse files
authored
chore: Add permissions to workflows (#166)
* Update pr-and-push.yml * Update pypi-publish-on-release.yml
1 parent 9ce8f3d commit ffc7c5e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/workflows/pr-and-push.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@ concurrency:
1313
jobs:
1414
call-test-lint:
1515
uses: ./.github/workflows/test-lint.yml
16+
permissions:
17+
contents: read
1618
with:
17-
ref: ${{ github.event.pull_request.head.sha }}
19+
ref: ${{ github.event.pull_request.head.sha }}

.github/workflows/pypi-publish-on-release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313

1414
build:
1515
name: Build distribution 📦
16+
permissions:
17+
contents: read
1618
needs:
1719
- call-test-lint
1820
runs-on: ubuntu-latest
@@ -55,6 +57,8 @@ jobs:
5557

5658
deploy:
5759
name: Upload release to PyPI
60+
permissions:
61+
contents: read
5862
needs:
5963
- build
6064
runs-on: ubuntu-latest
@@ -75,4 +79,4 @@ jobs:
7579
name: python-package-distributions
7680
path: dist/
7781
- name: Publish distribution 📦 to PyPI
78-
uses: pypa/gh-action-pypi-publish@release/v1
82+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)