Skip to content
Closed
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
6 changes: 6 additions & 0 deletions .github/workflows/ci-docs-only.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ jobs:
steps:
- run: 'echo "No build required"'

v2-test:
name: v2-test
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

lint:
name: lint
runs-on: ubuntu-latest
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,21 @@ jobs:
go-version: v1.26.2
- run: make test

# The v2 slim-core lives in its own go.work workspace (v2/sdk + v2/konnector)
# which the root `make test` does not descend into. lint/verify already cover
# v2 via GOMODS; this job adds its build, vet, unit, and envtest e2e suites.
v2-test:
name: v2-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: v1.26.2
- run: cd v2 && make build vet test
# test-e2e downloads envtest binaries on demand via setup-envtest.
- run: cd v2 && make test-e2e

lint:
name: lint
runs-on: ubuntu-latest
Expand Down Expand Up @@ -93,3 +108,19 @@ jobs:
go-version: v1.26.2
- uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
- run: make image-local

# Verify the v2 konnector image builds for all release architectures, without
# pushing. Mirrors the v2 release workflow's multi-arch buildx invocation.
v2-image-build:
name: v2-image-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
- name: Build v2 konnector image (multi-arch, no push)
run: |
docker buildx build \
--platform linux/amd64,linux/arm64 \
--file v2/konnector/Dockerfile \
--provenance=false \
v2
64 changes: 64 additions & 0 deletions .github/workflows/image-konnector-v2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Image konnector v2

# Publishes the v2 slim-core konnector image. Triggered ONLY by tags in the
# `konnector/v2*` namespace (e.g. `konnector/v2.0.0`), which deliberately do not
# match the `v*` tag filter the v1 image/goreleaser/CI workflows use — so this is
# fully independent of the existing v1 release infrastructure.
#
# The image is pushed to the shared `konnector` package under a v2 tag (the part
# after `konnector/`), e.g. ghcr.io/<owner>/konnector:v2.0.0. It is NOT tagged
# `latest`: v1 and v2 are distinct builds and `latest` stays with v1.
on:
push:
tags:
- 'konnector/v2*'

permissions:
contents: read
packages: write

jobs:
image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Compute image ref
id: meta
run: |
# refs/tags/konnector/v2.0.0 -> GITHUB_REF_NAME=konnector/v2.0.0 -> version=v2.0.0
version="${GITHUB_REF_NAME#konnector/}"
owner="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')"
{
echo "version=${version}"
echo "image=ghcr.io/${owner}/konnector"
} >> "$GITHUB_OUTPUT"

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0

- name: Login to GitHub Container Registry
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Multi-arch via in-Dockerfile cross-compile (builder is pinned to
# BUILDPLATFORM), so no QEMU is required. Build context is v2/ so the
# konnector module's `replace ../sdk` resolves. No :latest tag.
- name: Build and push v2 konnector image
run: |
docker buildx build \
--platform linux/amd64,linux/arm64 \
--file v2/konnector/Dockerfile \
--tag "${{ steps.meta.outputs.image }}:${{ steps.meta.outputs.version }}" \
--label "org.opencontainers.image.source=https://github.com/${{ github.repository }}" \
--label "org.opencontainers.image.revision=${{ github.sha }}" \
--label "org.opencontainers.image.version=${{ steps.meta.outputs.version }}" \
--label "org.opencontainers.image.title=konnector" \
--cache-from type=gha \
--cache-to type=gha,mode=max \
--provenance=false \
--push \
v2
Loading