Skip to content

Commit

Permalink
ci: add zizmor pre-commit hook and fix issues (#799)
Browse files Browse the repository at this point in the history
  • Loading branch information
radoering authored Dec 10, 2024
1 parent ab1bdf3 commit 4749d63
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/downstream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
path: poetry-core

- uses: actions/checkout@v4
with:
persist-credentials: false
path: poetry
repository: python-poetry/poetry
ref: ${{ matrix.ref }}
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- run: pipx run build

Expand All @@ -27,16 +29,19 @@ jobs:
needs: build
steps:
# We need to be in a git repo for gh to work.
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: distfiles
path: dist/

- run: gh release upload ${{ github.event.release.tag_name }} dist/*.{tar.gz,whl}
- run: gh release upload "${TAG_NAME}" dist/*.{tar.gz,whl}
env:
GH_TOKEN: ${{ github.token }}
TAG_NAME: ${{ github.event.release.tag_name }}

upload-pypi:
name: Upload (PyPI)
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
shell: bash
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/update-licenses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:

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

- name: Set up Python 3.10
uses: actions/setup-python@v5
Expand Down
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,11 @@ repos:
hooks:
- id: ruff
- id: ruff-format

- repo: https://github.com/woodruffw/zizmor-pre-commit
rev: v0.8.0
hooks:
- id: zizmor
# types and files can be removed with https://github.com/woodruffw/zizmor-pre-commit/pull/2
types: [yaml]
files: \.github/workflows/.*$

0 comments on commit 4749d63

Please sign in to comment.