Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

Commit e11e4f6

Browse files
committed
chore(ci): address zizmor findings
Signed-off-by: William Woodruff <william@astral.sh>
1 parent 556a6fc commit e11e4f6

2 files changed

Lines changed: 20 additions & 4 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
pull_request:
1010
branches: [main]
1111

12+
permissions: {}
13+
1214
jobs:
1315
check:
1416
name: Check
@@ -18,6 +20,8 @@ jobs:
1820
env:
1921
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2022
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
23+
with:
24+
persist-credentials: false
2125
- uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
2226
with:
2327
python-version: "3.11"
@@ -35,6 +39,8 @@ jobs:
3539
runs-on: ubuntu-latest
3640
steps:
3741
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
42+
with:
43+
persist-credentials: false
3844
- name: Install dependencies
3945
run: |
4046
sudo apt-get install -y ripgrep
@@ -51,7 +57,7 @@ jobs:
5157
)
5258
# Get the oldest supported version from the pyproject.toml
5359
OLDEST=$(rg -No '"ruff>=(.*)"' -r '$1' pyproject.toml)
54-
UNRELEASED=${{ env.RUFF_UNRELEASED_REF }}
60+
UNRELEASED=${RUFF_UNRELEASED_REF}
5561
5662
echo "::set-output name=latest::$LATEST"
5763
echo "::set-output name=oldest::$OLDEST"
@@ -85,6 +91,8 @@ jobs:
8591
env:
8692
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8793
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
94+
with:
95+
persist-credentials: false
8896
- uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
8997
with:
9098
python-version: ${{ matrix.python-version }}
@@ -102,15 +110,19 @@ jobs:
102110
- name: Install test Ruff version from PyPI
103111
if: ${{ matrix.ruff-version != env.RUFF_UNRELEASED_REF }}
104112
run: |
105-
pip install ruff==${{ matrix.ruff-version }}
113+
pip install ruff==${RUFF_VERSION}
106114
ruff --version
115+
env:
116+
RUFF_VERSION: ${{ matrix.ruff-version }}
107117

108118
- name: "Install test Ruff version from GitHub"
109119
if: ${{ matrix.ruff-version == env.RUFF_UNRELEASED_REF }}
110120
run: |
111-
pip install --force-reinstall git+https://github.com/astral-sh/ruff@${{ matrix.ruff-version }}
121+
pip install --force-reinstall git+https://github.com/astral-sh/ruff@${RUFF_VERSION}
112122
pip show ruff
113123
ruff version
124+
env:
125+
RUFF_VERSION: ${{ matrix.ruff-version }}
114126

115127
- name: Run tests
116128
run: just test

.github/workflows/release.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@ on:
77
env:
88
PYTHON_VERSION: "3.11"
99

10+
permissions: {}
11+
1012
jobs:
1113
release:
1214
runs-on: "ubuntu-latest"
1315
steps:
1416
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
17+
with:
18+
persist-credentials: false
1519
- uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
1620
with:
1721
python-version: ${{ env.PYTHON_VERSION }}
@@ -20,7 +24,7 @@ jobs:
2024
- name: Install dependencies
2125
run: hatch build
2226
- name: Publish to PyPi
23-
if: "startsWith(github.ref, 'refs/tags/')"
27+
if: startsWith(github.ref, 'refs/tags/')
2428
env:
2529
HATCH_INDEX_USER: __token__
2630
HATCH_INDEX_AUTH: ${{ secrets.RUFF_LSP_TOKEN }}

0 commit comments

Comments
 (0)