Skip to content

Commit c8d7a9d

Browse files
committed
Give it a go with uv script
1 parent 8c6257f commit c8d7a9d

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/poc-github-code-references.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
schedule:
77
- cron: '0 0 * * *' # Runs daily at midnight UTC
88
workflow_dispatch:
9+
pull_request: # DROPME
910

1011
env:
1112
EXCLUDE_PATTERNS: node_modules,venv,.git,cache,build,htmlcov,docs,.json,tests
@@ -27,12 +28,17 @@ jobs:
2728

2829
- name: Install dependencies
2930
run: |
30-
pip install requests==${{ env.PYTHON_REQUESTS_VERSION }}
31+
pip install uv==0.8.4
3132
3233
- name: Collect code references
3334
id: collect
3435
shell: python
3536
run: |
37+
uv run - <<EOF
38+
# /// script
39+
# requires-python = "${{ env.PYTHON_VERSION }}"
40+
# dependencies = ["requests==${{ env.PYTHON_REQUESTS_VERSION }}"]
41+
# ///
3642
import json
3743
import os
3844
import re
@@ -97,6 +103,7 @@ jobs:
97103
json_references = json.dumps(code_references)
98104
with open(os.environ["GITHUB_OUTPUT"], "a") as gh_output:
99105
print(f"code_references={json_references}", file=gh_output)
106+
EOF
100107
101108
- name: Display code references
102109
shell: python

0 commit comments

Comments
 (0)