Skip to content

Commit

Permalink
Fix zizmor findings on CI (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Dec 7, 2024
2 parents 099673e + 37971ed commit 767c7cb
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 18 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v5
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: Sync labels

permissions:
pull-requests: write

on:
push:
branches:
Expand All @@ -13,9 +10,13 @@ on:

jobs:
sync:
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: micnncim/action-label-syncer@v1
with:
prune: false
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,30 @@ on: [push, pull_request, workflow_dispatch]

env:
FORCE_COLOR: 1
PIP_DISABLE_PIP_VERSION_CHECK: 1

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: "3.x"
cache: pip
- uses: pre-commit/[email protected]
- uses: tox-dev/action-pre-commit-uv@v1

mypy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install uv
uses: hynek/setup-cached-uv@v2
- name: Mypy
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ on:
# types: [opened, reopened, synchronize]
workflow_dispatch:

permissions:
contents: read

jobs:
update_release_draft:
if: github.repository_owner == 'python-humanize'
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ on:
- published
workflow_dispatch:

permissions:
contents: read

env:
FORCE_COLOR: 1

Expand All @@ -27,6 +24,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- uses: hynek/build-and-inspect-python-package@v2

Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: Test

on: [push, pull_request, workflow_dispatch]

permissions:
contents: read

env:
FORCE_COLOR: 1

Expand All @@ -19,6 +16,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand Down

0 comments on commit 767c7cb

Please sign in to comment.