File tree Expand file tree Collapse file tree 4 files changed +436
-4
lines changed Expand file tree Collapse file tree 4 files changed +436
-4
lines changed Original file line number Diff line number Diff line change 1+ name : SBOM fetcher
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ only :
7+ description : " Owner prefix filter, e.g. opensource-observer/"
8+ required : false
9+ default : " "
10+ limit :
11+ description : " Limit number of repos to process (0 = all)"
12+ required : false
13+ default : " 0"
14+ incremental :
15+ description : " Skip unchanged repos"
16+ required : false
17+ default : " true"
18+ schedule :
19+ - cron : " 0 7 * * *" # daily at 07:00 UTC
20+
21+ concurrency :
22+ group : sbom-fetcher
23+ cancel-in-progress : false
24+
25+ permissions :
26+ contents : write
27+
28+ jobs :
29+ run :
30+ runs-on : ubuntu-latest
31+ steps :
32+ - name : Checkout
33+ uses : actions/checkout@v4
34+
35+ - name : Setup Python
36+ uses : actions/setup-python@v5
37+ with :
38+ python-version : " 3.11"
39+
40+ - name : Install dependencies
41+ run : |
42+ python -m pip install --upgrade pip
43+ pip install -r requirements.txt
44+
45+ - name : Run SBOM fetcher
46+ env :
47+ OSO_API_KEY : ${{ secrets.OSO_API_KEY }}
48+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
49+ run : |
50+ python scripts/sbom_fetcher.py \
51+ --output-dir data/sbom \
52+ $([ "${{ github.event.inputs.incremental || true }}" = "true" ] && echo "--incremental") \
53+ --only "${{ github.event.inputs.only || '' }}" \
54+ --limit ${{ github.event.inputs.limit || 0 }}
55+
56+ - name : Commit and push results
57+ uses : stefanzweifel/git-auto-commit-action@v5
58+ with :
59+ commit_message : " SBOM: snapshots and events"
60+ file_pattern : data/sbom/**
Original file line number Diff line number Diff line change @@ -205,3 +205,8 @@ cython_debug/
205205marimo /_static /
206206marimo /_lsp /
207207__marimo__ /
208+
209+
210+ * .parquet
211+ data /
212+ ! .gitkeep
Original file line number Diff line number Diff line change @@ -13,11 +13,11 @@ export OSO_API_KEY="<your_api_key>"
1313# optional for higher clone rate limits
1414export GITHUB_TOKEN=" <your_gh_pat>"
1515
16- # Small test run (default limit applies if no --only)
16+ # Small smoke test run (default limit applies if no --only) to test setup end to end without assuming any specfic owner
1717./.venv/bin/python scripts/sbom_fetcher.py --output-dir data/sbom --incremental
1818
19- # Focused owner run (no default limit when --only is provided)
20- ./.venv/bin/python scripts/sbom_fetcher.py --output-dir data/sbom --only opensource-observer/ --limit 0 --incremental
19+ # Focused owner run (no default limit when --only is provided) to test the actual OSO scoped command
20+ ./.venv/bin/python scripts/sbom_fetcher.py --output-dir data/sbom --only opensource-observer/ --limit 0
2121
2222# Source the deactivate script:
2323source .venv/bin/deactivate
You can’t perform that action at this time.
0 commit comments