From 3406bee90bbea468f595367c3b55be4549ea8ea2 Mon Sep 17 00:00:00 2001 From: Zeort Date: Wed, 9 Oct 2024 09:49:06 +0300 Subject: [PATCH] update workflows --- .github/workflows/build-korifi.yml | 8 ++++---- Makefile | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-korifi.yml b/.github/workflows/build-korifi.yml index 80a78d7..5e97774 100644 --- a/.github/workflows/build-korifi.yml +++ b/.github/workflows/build-korifi.yml @@ -5,7 +5,7 @@ on: env: REGISTRY: ghcr.io - V_KORIFI: '0.11.2' + KORIFI_REF: '0.11.2' IMAGE_NAME: ${{ github.repository }} jobs: @@ -23,7 +23,7 @@ jobs: uses: actions/checkout@v3 with: repository: unified-runtime/korifi-trinity - ref: v${{ env.V_KORIFI }} + ref: ${{ vars.KORIFI_REF }} github-server-url: 'https://github.tools.sap' token: ${{ secrets.KORIFI_TRINITY_TOKEN }} path: '.korifi' @@ -38,14 +38,14 @@ jobs: - name: Create korifi release artifacts env: - VERSION: ${{ env.V_KORIFI }} + VERSION: ${{ vars.KORIFI_REF }} DOCKER_REGISTRY: ${{ env.REGISTRY }} DOCKER_REGISTRY_USER: ${{ github.actor }} DOCKER_REGISTRY_PASS: ${{ secrets.GITHUB_TOKEN }} shell: bash working-directory: '.korifi' run: | - ../scripts/create-korifi-release.sh ${{ env.V_KORIFI }} + ../scripts/create-korifi-release.sh ${{ vars.KORIFI_REF }} diff --git a/Makefile b/Makefile index 7964d03..07715d9 100644 --- a/Makefile +++ b/Makefile @@ -98,9 +98,10 @@ endif release: manifests kustomize rm -rf release-$(VERSION) mkdir -p release-$(VERSION) + IMG_SHA=$(docker inspect --format='{{index .RepoDigests 0}}' ${REGISTRY}/${IMG}) cp default-cr.yaml release-$(VERSION)/cfapi-default-cr.yaml $(KUSTOMIZE) build config/crd > release-$(VERSION)/cfapi-crd.yaml - pushd config/manager && $(KUSTOMIZE) edit set image controller=${REGISTRY}/${IMG} && popd + pushd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG_SHA) && popd $(KUSTOMIZE) build config/default > release-$(VERSION)/cfapi-manager.yaml ##@ Deployment