Extract shared dockerfile-discovery helper script for image workflows
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 15h 13m
- Merged PRs (30d)
- 368
Description
## Motivation
`sbom.yml` and `osv-scanner.yml` each inline their own `find docker -name "*.dockerfile" ...` matrix-building shell. The new image-publishing workflow needs the same discovery (but for the `backend.ai-*` service dockerfiles). Per `.github/AGENTS.md`, decision logic belongs in a script, stated once.
## Details
1. Add `scripts/list-dockerfiles.sh` (or similar `-` name): arguments in (`--service` / `--infra` filter), JSON matrix printed out; no `GITHUB_*` access, reproducible by hand.
1. Include per-entry image name mapping for service images: dockerfile basename → `lablup/backend.ai-` (e.g. `backend.ai-manager.Dockerfile` → `lablup/backend.ai-manager`). Note both `.dockerfile` and `.Dockerfile` suffixes exist in `docker/`.
1. Switch `sbom.yml` and `osv-scanner.yml` matrix-preparation steps to call the script.
1. Add the script's row to `scripts/README.md`.
## Success Criteria
- [ ] One script owns dockerfile discovery; both existing workflows and the future `docker-images.yml` call it.
- [ ] Running the script locally prints the same matrix CI uses.
- [ ] `scripts/README.md` updated in the same PR.
JIRA Issue: BA-7267
Contributor guide
Research direction
Read .github/AGENTS.md and the matrix-preparation steps in .github/workflows/sbom.yml and .github/workflows/osv-scanner.yml. Run the existing discovery commands locally to compare their output, then use the new scripts/list-dockerfiles.sh and update scripts/README.md. Done means both workflows call the shared script and local output matches the CI matrix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, github-actions, shell
- Domain
- ci-cd, devops, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100