Skip to content

Commit 88a3425

Browse files
committed
fix
Signed-off-by: Chad Dombrova <[email protected]>
1 parent 6ebf3e7 commit 88a3425

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

.github/workflows/wheel.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ 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 }}
152+
repository: ${{ github.event.pull_request.head.repo.full_name }}
150153

151154
- name: Install Python
152155
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
@@ -171,11 +174,24 @@ jobs:
171174
./wheelhouse/*.whl
172175
./wheelhouse/OpenImageIO/__init__.pyi
173176
# 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"
177+
# if: success() || failure()
178+
179+
- name: Copy stubs to repo
180+
run: |
181+
pwd
182+
ls -la .
183+
ls -la ./wheelhouse/
184+
if [ -f ./wheelhouse/OpenImageIO/__init__.pyi ]; then
185+
echo "Copying stubs into repo"
186+
cp ./wheelhouse/OpenImageIO/__init__.pyi ./src/python/stubs/OpenImageIO/__init__.pyi
187+
fi
188+
# if: failure()
189+
190+
- name: Commit changed stubs back to the repository
191+
uses: stefanzweifel/git-auto-commit-action@v6
192+
with:
193+
commit_message: "Automatic update to python stubs"
194+
# if: failure()
179195

180196
# ---------------------------------------------------------------------------
181197
# 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)