Skip to content

Commit 8a90755

Browse files
committed
GitHub Actions: set minimal job token permissions
1 parent 7ca9a0e commit 8a90755

File tree

3 files changed

+28
-20
lines changed

3 files changed

+28
-20
lines changed

.github/workflows/coveralls.yml

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
name: LibraryOfCongress/tests-bagit-python
2+
permissions:
3+
contents: read
4+
25
on:
3-
workflow_dispatch:
6+
workflow_dispatch:
47
jobs:
5-
test:
6-
runs-on: ubuntu-16.04
7-
steps:
8-
- name: checkout
9-
uses: actions/checkout@v3.5.0
10-
- uses: actions/setup-python@v4.6.0
11-
with:
12-
python-version: "${{ matrix.python }}"
13-
- run: apt-get -y install gettext
14-
- run: pip install --upgrade pip
15-
- run: pip install coveralls coverage
16-
- run: coverage run --include=bagit.py setup.py test
17-
- run: coveralls
18-
if: "${{ success() }}"
19-
strategy:
20-
matrix:
21-
python:
22-
- '3.10'
8+
test:
9+
runs-on: ubuntu-16.04
10+
steps:
11+
- name: checkout
12+
uses: actions/checkout@v3.5.0
13+
- uses: actions/setup-python@v4.6.0
14+
with:
15+
python-version: "${{ matrix.python }}"
16+
- run: apt-get -y install gettext
17+
- run: pip install --upgrade pip
18+
- run: pip install coveralls coverage
19+
- run: coverage run --include=bagit.py setup.py test
20+
- run: coveralls
21+
if: "${{ success() }}"
22+
strategy:
23+
matrix:
24+
python:
25+
- "3.10"

.github/workflows/pypi-release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
name: "PyPI releases"
2+
permissions:
3+
contents: read
24

35
on: release
46

.github/workflows/test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
name: Test
2+
permissions:
3+
contents: read
24

35
on:
46
push:
@@ -20,7 +22,8 @@ jobs:
2022
strategy:
2123
fail-fast: false
2224
matrix:
23-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
25+
python-version:
26+
["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
2427
steps:
2528
- uses: actions/checkout@v4
2629
- name: Set up Python ${{ matrix.python-version }}

0 commit comments

Comments
 (0)