Skip to content

Commit 945e8d4

Browse files
committed
fix
Signed-off-by: Chad Dombrova <chadrik@gmail.com>
1 parent 6ebf3e7 commit 945e8d4

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

.github/workflows/wheel.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ jobs:
147147
steps:
148148
- name: Checkout repo
149149
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
150+
with:
151+
ref: ${{ github.event.pull_request.head.ref }}
150152

151153
- name: Install Python
152154
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
@@ -171,11 +173,24 @@ jobs:
171173
./wheelhouse/*.whl
172174
./wheelhouse/OpenImageIO/__init__.pyi
173175
# if stub validation fails we want to upload the stubs for users to review
174-
if: success() || failure()
175-
176-
# Commit all changed files back to the repository
177-
- uses: stefanzweifel/git-auto-commit-action@v6
178-
commit_message: "Automatic update to python stubs"
176+
# if: success() || failure()
177+
178+
- name: Copy stubs to repo
179+
run: |
180+
pwd
181+
ls -la .
182+
ls -la ./wheelhouse/
183+
if [ -f ./wheelhouse/OpenImageIO/__init__.pyi ]; then
184+
echo "Copying stubs into repo"
185+
cp ./wheelhouse/OpenImageIO/__init__.pyi ./src/python/stubs/OpenImageIO/__init__.pyi
186+
fi
187+
# if: failure()
188+
189+
- name: Commit changed stubs back to the repository
190+
uses: stefanzweifel/git-auto-commit-action@v6
191+
with:
192+
commit_message: "Automatic update to python stubs"
193+
# if: failure()
179194

180195
# ---------------------------------------------------------------------------
181196
# Linux ARM Wheels

src/python/stubs/generate_stubs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def main() -> None:
209209
print(get_colored_diff(old_text, new_text))
210210
print("Run `make pystubs` locally and commit the results for review.")
211211
print("The resulting __init__.pyi file will be uploaded as an artifact on this job.")
212-
sys.exit(2)
212+
# sys.exit(2)
213213

214214

215215
if __name__ == "__main__":

0 commit comments

Comments
 (0)