Skip to content

Commit ebbb073

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

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

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

Lines changed: 8 additions & 2 deletions
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,16 @@ 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
34-
shell: python
3535
run: |
36+
uv run - <<EOF
37+
# /// script
38+
# requires-python = "${{ env.PYTHON_VERSION }}"
39+
# dependencies = ["requests==${{ env.PYTHON_REQUESTS_VERSION }}"]
40+
# ///
3641
import json
3742
import os
3843
import re
@@ -97,6 +102,7 @@ jobs:
97102
json_references = json.dumps(code_references)
98103
with open(os.environ["GITHUB_OUTPUT"], "a") as gh_output:
99104
print(f"code_references={json_references}", file=gh_output)
105+
EOF
100106
101107
- name: Display code references
102108
shell: python

0 commit comments

Comments
 (0)