Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish ct-test-srv container on releases #7891

Merged
merged 7 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,12 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# https://cli.github.com/manual/gh_release_upload
run: gh release upload "${GITHUB_REF_NAME}" boulder*.deb boulder*.tar.gz boulder*.checksums.txt

- name: Build ct-test-srv Container
run: docker buildx build . --build-arg "GO_VERSION=${{ matrix.GO_VERSION }}" -f test/ct-test-srv/Dockerfile -t "ghcr.io/letsencrypt/ct-test-srv:${{ github.ref_name }}"

- name: Login to ghcr.io
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin

- name: Push ct-test-srv Container
run: docker push "ghcr.io/letsencrypt/ct-test-srv:${{ github.ref_name }}"
3 changes: 3 additions & 0 deletions .github/workflows/try-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ jobs:
- name: Show checksums
id: check
run: cat boulder*.checksums.txt

- name: Build ct-test-srv Container
run: docker buildx build . --build-arg "GO_VERSION=${{ matrix.GO_VERSION }}" -f test/ct-test-srv/Dockerfile -t "ghcr.io/letsencrypt/ct-test-srv:${{ github.sha }}"
25 changes: 25 additions & 0 deletions test/ct-test-srv/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
ARG GO_VERSION

FROM golang:${GO_VERSION} AS build

WORKDIR /app

COPY go.mod go.sum vendor ./

COPY . .

RUN go build -o /bin/ct-test-srv ./test/ct-test-srv/main.go

FROM ubuntu:24.04

RUN useradd -r -u 10001 cttest

COPY --from=build /bin/ct-test-srv /bin/ct-test-srv

COPY test/ct-test-srv/ct-test-srv.json /etc/ct-test-srv.json

ENTRYPOINT ["/bin/ct-test-srv"]

USER cttest

CMD ["-config", "/etc/ct-test-srv.json"]
Loading