Skip to content

Commit 716d32e

Browse files
authored
Merge pull request #165 from arvkevi/workflow-permission-patch
Workflow permissions
2 parents 1d0befc + ee005ad commit 716d32e

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
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

+12-4
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,31 @@ 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:
11-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
15+
python-version: ["3.8", "3.9", "3.10", "3.11"]
1216
os: [ubuntu-latest, macos-latest, windows-latest]
1317
exclude: # Python < v3.8 does not support Apple Silicon ARM64.
1418
- python-version: "3.7"
1519
os: macos-latest
20+
- python-version: "3.7"
21+
os: ubuntu-latest
1622
include: # So run those legacy versions on Intel CPUs.
1723
- python-version: "3.7"
1824
os: macos-13
25+
- python-version: "3.7"
26+
os: windows-latest
1927
env:
2028
OS: ${{ matrix.os }}
21-
PYHTHON: ${{ matrix.python-version }}
29+
PYTHON: ${{ matrix.python-version }}
2230
steps:
2331
- uses: actions/checkout@v3
2432
- name: Set up Python ${{ matrix.python-version }}

0 commit comments

Comments
 (0)