File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4747 push : ${{ github.event_name != 'pull_request' }}
4848 tags : ${{ steps.meta.outputs.tags }}
4949 labels : ${{ steps.meta.outputs.labels }}
50+ build-args : |
51+ OSSGUARD_VERSION=${{ github.ref_name }}
5052 cache-from : type=gha
5153 cache-to : type=gha,mode=max
Original file line number Diff line number Diff line change 1- FROM python:3.12-slim@sha256:46cb7cc2877e60fbd5e21a9ae6115c30ace7a077b9f8772da879e4590c18c2e3 AS builder
1+ FROM golang:1.22-alpine AS builder
22
3- WORKDIR /app
4- COPY pyproject.toml README.md LICENSE ./
5- COPY src/ src/
3+ WORKDIR /build
64
7- RUN pip install --no-cache-dir build==1.2.2.post1 && \
8- python -m build --wheel && \
9- pip install --no-cache-dir dist/*.whl
5+ # Clone ossguard-go and build static binary
6+ ARG OSSGUARD_VERSION=main
7+ RUN apk add --no-cache git && \
8+ git clone --depth 1 --branch ${OSSGUARD_VERSION} \
9+ https://github.com/kirankotari/ossguard-go.git . && \
10+ CGO_ENABLED=0 go build -ldflags="-s -w" -o ossguard ./cmd/ossguard
1011
11- FROM python :3.12-slim@sha256:46cb7cc2877e60fbd5e21a9ae6115c30ace7a077b9f8772da879e4590c18c2e3
12+ FROM alpine :3.20
1213
1314LABEL org.opencontainers.image.source="https://github.com/kirankotari/ossguard"
1415LABEL org.opencontainers.image.description="One CLI to guard any OSS project with OpenSSF security best practices"
1516LABEL org.opencontainers.image.licenses="Apache-2.0"
1617
17- RUN apt-get update && \
18- apt-get install -y --no-install-recommends git && \
19- rm -rf /var/lib/apt/lists/*
18+ RUN apk add --no-cache git && \
19+ adduser -D -h /home/ossguard ossguard
2020
21- COPY --from=builder /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages
22- COPY --from=builder /usr/local/bin/ossguard /usr/local/bin/ossguard
21+ COPY --from=builder /build/ossguard /usr/local/bin/ossguard
2322
24- RUN useradd --create-home ossguard
2523USER ossguard
2624WORKDIR /project
2725
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44
55[project ]
66name = " ossguard"
7- version = " 0.1.0 "
7+ version = " 0.1.1 "
88description = " One-command CLI to guard any OSS project with OpenSSF security best practices — bootstrap, scan, and monitor."
99readme = " README.md"
1010license = {text = " Apache-2.0" }
You can’t perform that action at this time.
0 commit comments