From 0695682e3e5dec3a9c6a4bab8ade88f4b179de5d Mon Sep 17 00:00:00 2001 From: Vishal Choudhary Date: Mon, 3 Jun 2024 20:13:59 +0530 Subject: [PATCH] fix: image publish ci Signed-off-by: Vishal Choudhary --- .github/actions/publish-image/action.yaml | 1 + .github/workflows/publish-images.yaml | 5 ++++- Makefile | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/actions/publish-image/action.yaml b/.github/actions/publish-image/action.yaml index 368531c..b1bad26 100644 --- a/.github/actions/publish-image/action.yaml +++ b/.github/actions/publish-image/action.yaml @@ -50,6 +50,7 @@ runs: env: REGISTRY: ${{ inputs.registry }} REPO: ${{ inputs.repository }} + REGISTRY_USERNAME: ${{ inputs.registry-username }} REGISTRY_PASSWORD: ${{ inputs.registry-password }} COSIGN_REPOSITORY: ${{ inputs.sbom-repository }} run: | diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 2d3c72c..ee26411 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -5,6 +5,9 @@ name: Publish images permissions: {} on: + pull_request: + branches: + - main push: branches: - 'main' @@ -72,4 +75,4 @@ jobs: digest: "${{ needs.publish-images.outputs.reports-server-digest }}" registry-username: ${{ github.actor }} secrets: - registry-password: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + registry-password: ${{ secrets.GITHUB_TOKEN }} diff --git a/Makefile b/Makefile index d67c285..32ce75f 100644 --- a/Makefile +++ b/Makefile @@ -227,4 +227,4 @@ ko-login: $(KO) .PHONY: ko-publish-reports-server ko-publish-reports-server: ko-login ## Build and publish reports-server image (with ko) @LD_FLAGS=$(LD_FLAGS) KOCACHE=$(KOCACHE) KO_DOCKER_REPO=$(REPO_REPORTS_SERVER) \ - $(KO) build . --bare --tags=$(KO_TAGS) --platform=$(PLATFORMS) \ No newline at end of file + $(KO) build . --bare --tags=$(KO_TAGS) --platform=$(PLATFORMS)