From 29b4af1ab73d79469dfc32ffd85d49dcbe91dd07 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Tue, 1 Oct 2024 21:56:16 +0200 Subject: [PATCH] Automatically point to correct repository Without this, the CI would automatically point DH_ORG to kubereboot/kured on ghcr, instead of pointing to the owner of the repo. This makes the CI smoother. Signed-off-by: Jean-Philippe Evrard --- .github/workflows/on-pr.yaml | 14 +++++++------- .github/workflows/periodics-daily.yaml | 2 +- Makefile | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index 46ed0be..a56a436 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -86,7 +86,7 @@ jobs: run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT id: tags - name: Build image - run: VERSION="${{ steps.tags.outputs.sha_short }}" make image + run: VERSION="${{ steps.tags.outputs.sha_short }}" DH_ORG="${{ github.repository_owner }}" make image - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8 with: @@ -132,8 +132,8 @@ jobs: id: tags - name: Build artifacts run: | - VERSION="${{ steps.tags.outputs.sha_short }}" make image - VERSION="${{ steps.tags.outputs.sha_short }}" make manifest + VERSION="${{ steps.tags.outputs.sha_short }}" DH_ORG="${{ github.repository_owner }}" make image + VERSION="${{ steps.tags.outputs.sha_short }}" DH_ORG="${{ github.repository_owner }}" make manifest - name: Workaround "Failed to attach 1 to compat systemd cgroup /actions_job/..." on gh actions run: | @@ -217,8 +217,8 @@ jobs: id: tags - name: Build artifacts run: | - VERSION="${{ steps.tags.outputs.sha_short }}" make image - VERSION="${{ steps.tags.outputs.sha_short }}" make manifest + VERSION="${{ steps.tags.outputs.sha_short }}" DH_ORG="${{ github.repository_owner }}" make image + VERSION="${{ steps.tags.outputs.sha_short }}" DH_ORG="${{ github.repository_owner }}" make manifest - name: Workaround "Failed to attach 1 to compat systemd cgroup /actions_job/..." on gh actions run: | @@ -303,8 +303,8 @@ jobs: id: tags - name: Build artifacts run: | - VERSION="${{ steps.tags.outputs.sha_short }}" make image - VERSION="${{ steps.tags.outputs.sha_short }}" make manifest + VERSION="${{ steps.tags.outputs.sha_short }}" DH_ORG="${{ github.repository_owner }}" make image + VERSION="${{ steps.tags.outputs.sha_short }}" DH_ORG="${{ github.repository_owner }}" make manifest - name: Workaround "Failed to attach 1 to compat systemd cgroup /actions_job/..." on gh actions run: | diff --git a/.github/workflows/periodics-daily.yaml b/.github/workflows/periodics-daily.yaml index 40ba746..a7fa8c8 100644 --- a/.github/workflows/periodics-daily.yaml +++ b/.github/workflows/periodics-daily.yaml @@ -68,7 +68,7 @@ jobs: run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT id: tags - name: Build artifacts - run: VERSION="${{ steps.tags.outputs.sha_short }}" make image + run: VERSION="${{ steps.tags.outputs.sha_short }}" DH_ORG="${{ github.repository_owner }}" make image - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8 with: diff --git a/Makefile b/Makefile index f4240f3..378032d 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ TEMPDIR=./.tmp GORELEASER_CMD=$(TEMPDIR)/goreleaser -DH_ORG=kubereboot +DH_ORG ?= kubereboot VERSION=$(shell git rev-parse --short HEAD) SUDO=$(shell docker info >/dev/null 2>&1 || echo "sudo -E")