From 0020a7c749b8b262b2b52f2922544b3ecfa46e0f Mon Sep 17 00:00:00 2001 From: shuting Date: Fri, 3 Feb 2023 02:51:14 +0800 Subject: [PATCH] chore: publish images for the reports and the background controller (#6194) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * publish images: reports and background controller Signed-off-by: ShutingZhao * fix makefile Signed-off-by: Charles-Edouard Brétéché --------- Signed-off-by: ShutingZhao Signed-off-by: Charles-Edouard Brétéché Co-authored-by: Charles-Edouard Brétéché Co-authored-by: Charles-Edouard Brétéché --- .github/workflows/images-publish.yaml | 26 ++++++++++++++++++++++++++ Makefile | 8 ++++---- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/.github/workflows/images-publish.yaml b/.github/workflows/images-publish.yaml index 410ebb973f..28409e841e 100644 --- a/.github/workflows/images-publish.yaml +++ b/.github/workflows/images-publish.yaml @@ -89,3 +89,29 @@ jobs: sbom-repository: ghcr.io/${{ github.repository_owner }}/sbom signature-repository: ghcr.io/${{ github.repository_owner }}/signatures main-path: ./cmd/cli/kubectl-kyverno + - name: Publish reports-controller + uses: ./.github/actions/publish-image + with: + makefile-target: ko-publish-reports-controller-dev + registry: ghcr.io + registry-username: ${{ github.actor }} + registry-password: ${{ secrets.CR_PAT }} + repository: ${{ github.repository_owner }} + sign-image: true + sbom-name: reports-controller + sbom-repository: ghcr.io/${{ github.repository_owner }}/sbom + signature-repository: ghcr.io/${{ github.repository_owner }}/signatures + main-path: ./cmd/reports-controller + - name: Publish background-controller + uses: ./.github/actions/publish-image + with: + makefile-target: ko-publish-background-controller-dev + registry: ghcr.io + registry-username: ${{ github.actor }} + registry-password: ${{ secrets.CR_PAT }} + repository: ${{ github.repository_owner }} + sign-image: true + sbom-name: background-controller + sbom-repository: ghcr.io/${{ github.repository_owner }}/sbom + signature-repository: ghcr.io/${{ github.repository_owner }}/signatures + main-path: ./cmd/background-controller diff --git a/Makefile b/Makefile index 1e219fbea1..5163cf11a5 100644 --- a/Makefile +++ b/Makefile @@ -322,9 +322,9 @@ ko-publish-cleanup-controller: ko-login ## Build and publish cleanup controller ko-publish-reports-controller: ko-login ## Build and publish reports controller image (with ko) @LD_FLAGS=$(LD_FLAGS) KOCACHE=$(KOCACHE) KO_DOCKER_REPO=$(REPO_REPORTS) $(KO) build $(REPORTS_DIR) --bare --tags=$(KO_TAGS) --platform=$(PLATFORMS) -.PHONY: ko-publish-backgound-controller -ko-publish-backgound-controller: ko-login ## Build and publish background controller image (with ko) - @LD_FLAGS=$(LD_FLAGS) KOCACHE=$(KOCACHE) KO_DOCKER_REPO=$(REPO_REPORTS) $(KO) build $(BACKGROUND_DIR) --bare --tags=$(KO_TAGS) --platform=$(PLATFORMS) +.PHONY: ko-publish-background-controller +ko-publish-background-controller: ko-login ## Build and publish background controller image (with ko) + @LD_FLAGS=$(LD_FLAGS) KOCACHE=$(KOCACHE) KO_DOCKER_REPO=$(REPO_BACKGROUND) $(KO) build $(BACKGROUND_DIR) --bare --tags=$(KO_TAGS) --platform=$(PLATFORMS) .PHONY: ko-publish-kyverno-init-dev ko-publish-kyverno-init-dev: ko-login ## Build and publish kyvernopre dev image (with ko) @@ -351,7 +351,7 @@ ko-publish-background-controller-dev: ko-login ## Build and publish background c @LD_FLAGS=$(LD_FLAGS_DEV) KOCACHE=$(KOCACHE) KO_DOCKER_REPO=$(REPO_BACKGROUND) $(KO) build $(BACKGROUND_DIR) --bare --tags=$(KO_TAGS_DEV) --platform=$(PLATFORMS) .PHONY: ko-publish-all -ko-publish-all: ko-publish-kyverno-init ko-publish-kyverno ko-publish-cli ko-publish-cleanup-controller ko-publish-reports-controller ko-publish-backgound-controller ## Build and publish all images (with ko) +ko-publish-all: ko-publish-kyverno-init ko-publish-kyverno ko-publish-cli ko-publish-cleanup-controller ko-publish-reports-controller ko-publish-background-controller ## Build and publish all images (with ko) .PHONY: ko-publish-all-dev ko-publish-all-dev: ko-publish-kyverno-init-dev ko-publish-kyverno-dev ko-publish-cli-dev ko-publish-cleanup-controller-dev ko-publish-reports-controller-dev ko-publish-background-controller-dev ## Build and publish all dev images (with ko)