diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 365c0f10..0fe7b51b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,7 +5,6 @@ on: branches: - '**' - '!master' - - '!main' jobs: build: @@ -160,6 +159,7 @@ jobs: run: | echo "IMAGE_FULL_NAME=$(make image_full_name)" >> $GITHUB_ENV echo "IMAGE_LATEST_NAME=$(make image_latest_name)" >> $GITHUB_ENV + echo "IMAGE_CACHE_NAME=$(make image_cache_name)" >> $GITHUB_ENV - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -180,5 +180,5 @@ jobs: push: false tags: ${{ steps.set_variable.outputs.IMAGE_LATEST_NAME }},${{ steps.set_variable.outputs.IMAGE_FULL_NAME }} platforms: linux/amd64,linux/arm64 - cache-from: type=registry,ref=isindir/sops-secrets-operator:cache - cache-to: type=registry,ref=isindir/sops-secrets-operator:cache,mode=max + cache-from: type=registry,ref=${{ steps.set_variable.outputs.IMAGE_CACHE_NAME }} + cache-to: type=registry,ref=${{ steps.set_variable.outputs.IMAGE_FULL_NAME }}:cache,mode=max diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d4c5d54f..864c7e60 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -50,6 +50,8 @@ jobs: password: ${{ secrets.DOCKERHUB_PASS }} - name: Tag and release + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} run: | set +e git tag "${SOPS_SEC_OPERATOR_VERSION}" diff --git a/Makefile b/Makefile index 37c266ce..20f8c350 100644 --- a/Makefile +++ b/Makefile @@ -88,6 +88,10 @@ image_full_name: ## Prints out image full name set in Makefile image_latest_name: ## Prints out image latest name set in Makefile @echo ${IMG_LATEST} +.PHONY: image_cache_name +image_cache_name: ## Prints out image cache name set in Makefile + @echo ${IMG_CACHE} + .PHONY: tidy tidy: ## Fetches all go dependencies. $(GO) mod tidy