Skip to content

Commit b65c192

Browse files
committed
Workflow permissions
1 parent 1d0befc commit b65c192

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.github/workflows/pythonpublish.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@ on:
44
release:
55
types: [created]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
deploy:
912
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write # Only grant write permission to contents for this job
1015
steps:
11-
- uses: actions/checkout@v1
16+
- uses: actions/checkout@v2 # Updated to the latest version
1217
- name: Set up Python
13-
uses: actions/setup-python@v1
18+
uses: actions/setup-python@v2 # Updated to the latest version
1419
with:
1520
python-version: '3.x'
1621
- name: Install dependencies

.github/workflows/tests.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ name: Unit tests and coverage
22

33
on: [push, workflow_dispatch, pull_request]
44

5-
jobs:
6-
build:
5+
permissions:
6+
contents: read
7+
issues: write
8+
pull-requests: write
79

10+
jobs:
11+
build:
812
runs-on: ${{ matrix.os }}
913
strategy:
1014
matrix:

0 commit comments

Comments
 (0)