Skip to content

Commit 8f28857

Browse files
committed
yml, npm, gitmodules, foundry, npm features added
1 parent 35ea2bf commit 8f28857

File tree

4 files changed

+436
-4
lines changed

4 files changed

+436
-4
lines changed

.github/workflows/sbom.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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/**

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,8 @@ cython_debug/
205205
marimo/_static/
206206
marimo/_lsp/
207207
__marimo__/
208+
209+
210+
*.parquet
211+
data/
212+
!.gitkeep

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ export OSO_API_KEY="<your_api_key>"
1313
# optional for higher clone rate limits
1414
export 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:
2323
source .venv/bin/deactivate

0 commit comments

Comments
 (0)