Skip to content

Commit d403a82

Browse files
committed
sigstore-ingest
1 parent e3597ae commit d403a82

File tree

7 files changed

+3576
-15
lines changed

7 files changed

+3576
-15
lines changed

.github/workflows/ci.yml

Lines changed: 47 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ on:
88

99
env:
1010
REGISTRY: ghcr.io
11-
BACKEND_IMAGE_NAME: ${{ github.repository }}/ctmon-ingest
11+
CTMON_INGEST_IMAGE_NAME: ${{ github.repository }}/ctmon-ingest
12+
SIGSTORE_INGEST_IMAGE_NAME: ${{ github.repository }}/sigstore-ingest
1213
UI_IMAGE_NAME: ${{ github.repository }}/ctmon-ui
1314

1415
jobs:
@@ -42,7 +43,7 @@ jobs:
4243
- name: Build UI
4344
run: cd ui && npm run build
4445

45-
build-and-push-backend:
46+
build-and-push-ctmon-ingest:
4647
needs: test
4748
runs-on: ubuntu-latest
4849
permissions:
@@ -60,26 +61,64 @@ jobs:
6061
username: ${{ github.actor }}
6162
password: ${{ secrets.GITHUB_TOKEN }}
6263

63-
- name: Extract backend metadata
64-
id: meta-backend
64+
- name: Extract ctmon-ingest metadata
65+
id: meta-ctmon-ingest
6566
uses: docker/metadata-action@v5
6667
with:
67-
images: ${{ env.REGISTRY }}/${{ env.BACKEND_IMAGE_NAME }}
68+
images: ${{ env.REGISTRY }}/${{ env.CTMON_INGEST_IMAGE_NAME }}
6869
tags: |
6970
type=ref,event=branch
7071
type=ref,event=pr
7172
type=sha
7273
type=raw,value=latest,enable={{is_default_branch}}
7374
74-
- name: Build and push backend Docker image
75+
- name: Build and push ctmon-ingest Docker image
7576
uses: docker/build-push-action@v5
7677
with:
7778
context: .
7879
push: true
79-
tags: ${{ steps.meta-backend.outputs.tags }}
80-
labels: ${{ steps.meta-backend.outputs.labels }}
80+
tags: ${{ steps.meta-ctmon-ingest.outputs.tags }}
81+
labels: ${{ steps.meta-ctmon-ingest.outputs.labels }}
8182
target: ctmon_ingest
8283

84+
build-and-push-sigstore-ingest:
85+
needs: test
86+
runs-on: ubuntu-latest
87+
permissions:
88+
contents: read
89+
packages: write
90+
91+
steps:
92+
- name: Checkout repository
93+
uses: actions/checkout@v4
94+
95+
- name: Log in to Container Registry
96+
uses: docker/login-action@v3
97+
with:
98+
registry: ${{ env.REGISTRY }}
99+
username: ${{ github.actor }}
100+
password: ${{ secrets.GITHUB_TOKEN }}
101+
102+
- name: Extract sigstore-ingest metadata
103+
id: meta-sigstore-ingest
104+
uses: docker/metadata-action@v5
105+
with:
106+
images: ${{ env.REGISTRY }}/${{ env.SIGSTORE_INGEST_IMAGE_NAME }}
107+
tags: |
108+
type=ref,event=branch
109+
type=ref,event=pr
110+
type=sha
111+
type=raw,value=latest,enable={{is_default_branch}}
112+
113+
- name: Build and push sigstore-ingest Docker image
114+
uses: docker/build-push-action@v5
115+
with:
116+
context: .
117+
push: true
118+
tags: ${{ steps.meta-sigstore-ingest.outputs.tags }}
119+
labels: ${{ steps.meta-sigstore-ingest.outputs.labels }}
120+
target: sigstore_ingest
121+
83122
build-and-push-ui:
84123
needs: test
85124
runs-on: ubuntu-latest

Dockerfile

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ COPY . .
1818
# Build the binary
1919
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o ctmon-ingest ./cmd/ctmon-ingest
2020

21-
# Go backend runtime stage
21+
# Go ingest runtime stage
2222
FROM alpine:latest AS ctmon_ingest
2323

2424
# Install ca-certificates for HTTPS requests
@@ -35,6 +35,23 @@ EXPOSE 8080
3535
# Run the binary
3636
CMD ["./ctmon-ingest"]
3737

38+
# Go ingest runtime stage
39+
FROM alpine:latest AS sigstore_ingest
40+
41+
# Install ca-certificates for HTTPS requests
42+
RUN apk --no-cache add ca-certificates
43+
44+
WORKDIR /root/
45+
46+
# Copy the binary from builder stage
47+
COPY --from=builder /app/sigstore-ingest .
48+
49+
# Expose port (if needed for health checks)
50+
EXPOSE 8080
51+
52+
# Run the binary
53+
CMD ["./sigstore-ingest"]
54+
3855
# UI build stage
3956
FROM node:20-alpine AS ui-builder
4057

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
# ctmon
2-
Certificate transparency monitor
1+
# transparency.cafe
2+
3+
Ingest, query, and analyze internet transparency data from multiple sources:
4+
5+
- Certificate transparency logs
6+
- Sigstore

0 commit comments

Comments
 (0)