Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
26 changes: 26 additions & 0 deletions .github/workflows/updater-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ name: Updater CI
on:
pull_request:
paths:
- "deployment/compose.postgres.yml"
- "deployment/updater/**"
- ".github/workflows/updater-ci.yml"
push:
branches:
- main
paths:
- "deployment/compose.postgres.yml"
- "deployment/updater/**"
- ".github/workflows/updater-ci.yml"

Expand Down Expand Up @@ -79,3 +81,27 @@ jobs:
run: |
mkdir -p dist
go build -o dist/control-plane-updater-${{ matrix.goos }}-${{ matrix.goarch }} .

image:
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- linux/amd64
- linux/arm64
defaults:
run:
working-directory: deployment/updater

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Set up QEMU
uses: docker/setup-qemu-action@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4

- name: Build updater image
run: docker buildx build --pull --load --platform "${{ matrix.platform }}" --tag techulus-cloud-updater:test .
15 changes: 13 additions & 2 deletions deployment/updater/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,20 @@ WORKDIR /src
COPY go.mod main.go ./
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/control-plane-updater .

FROM docker:28-cli
FROM docker:28-cli AS docker-cli

RUN apk add --no-cache bash curl docker-cli-compose postgresql-client
FROM alpine:3.23

# Keep pg_dump on the same major version as the bundled postgres:18 service.
RUN apk add --no-cache ca-certificates curl postgresql18-client

COPY --from=docker-cli /usr/local/bin/docker /usr/local/bin/docker
COPY --from=docker-cli /usr/local/libexec/docker/cli-plugins/docker-compose /usr/local/libexec/docker/cli-plugins/docker-compose

RUN pg_dump --version | grep -Eq 'PostgreSQL\) 18\.' \
&& docker --version \
&& docker compose version \
&& curl --version

WORKDIR /app
COPY --from=builder /out/control-plane-updater ./control-plane-updater
Expand Down
Loading