Annotate Leases with Connection name (#607) #238
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Image | |
| # Build and push the konnector + backend images. Pushes only on tags: | |
| # - tags v* -> ghcr.io/<owner>/konnector:<version>, ghcr.io/<owner>/backend:<version> | |
| # No :latest or :<sha> tags — the image repo is shared with v1/main images. | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| image: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - 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 pinned to | |
| # BUILDPLATFORM), so no QEMU is required. | |
| - name: Build and push | |
| run: | | |
| owner="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" | |
| for target in konnector backend; do | |
| docker buildx build \ | |
| --platform linux/amd64,linux/arm64 \ | |
| --target "${target}" \ | |
| --tag "ghcr.io/${owner}/${target}:${GITHUB_REF_NAME}" \ | |
| --label "org.opencontainers.image.source=https://github.com/${{ github.repository }}" \ | |
| --label "org.opencontainers.image.revision=${{ github.sha }}" \ | |
| --label "org.opencontainers.image.title=${target}" \ | |
| --cache-from type=gha \ | |
| --cache-to type=gha,mode=max \ | |
| --provenance=false \ | |
| --push \ | |
| . | |
| done |