From 8f84323cd0095d3d61ebfb7b5502371985430497 Mon Sep 17 00:00:00 2001 From: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> Date: Fri, 4 Oct 2024 11:51:52 +0200 Subject: [PATCH] fix: do plain push from the main release action (#532) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change. ## What type of PR is this? (check all applicable) - [ ] 🍕 Feature - [ ] 🐛 Bug Fix - [ ] 📝 Documentation Update - [ ] 🎨 Style - [ ] 🧑‍💻 Code Refactor - [ ] 🔥 Performance Improvements - [ ] ✅ Test - [ ] 🤖 Build - [ ] 🔁 CI - [ ] 📦 Chore (Release) - [ ] ⏩ Revert ## Related Tickets & Documents - Related Issue # (issue) - Closes # (issue) - Fixes # (issue) > Remove if not applicable ## Screenshots ## Added tests? - [ ] 👍 yes - [ ] 🙅 no, because they aren't needed - [ ] 🙋 no, because I need help - [ ] Separate ticket for tests # (issue/pr) Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration ## Added to documentation? - [ ] 📜 README.md - [ ] 🙅 no documentation needed ## Checklist: - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules --- .../{components_test.yaml => components.yaml} | 2 +- .github/workflows/components_push.yaml | 43 ------------------- .github/workflows/release.yaml | 14 +++--- Makefile | 8 ++++ docs/release_notes/v0.24.12.md | 3 ++ pkg/version/release.go | 2 +- 6 files changed, 18 insertions(+), 54 deletions(-) rename .github/workflows/{components_test.yaml => components.yaml} (93%) delete mode 100644 .github/workflows/components_push.yaml create mode 100644 docs/release_notes/v0.24.12.md diff --git a/.github/workflows/components_test.yaml b/.github/workflows/components.yaml similarity index 93% rename from .github/workflows/components_test.yaml rename to .github/workflows/components.yaml index d73f3052..4bb1bfe7 100644 --- a/.github/workflows/components_test.yaml +++ b/.github/workflows/components.yaml @@ -38,4 +38,4 @@ jobs: - name: CTF run: | cd component/ - PATH=$PATH:$(go env GOPATH)/bin make ocm && make ctf \ No newline at end of file + PATH=$PATH:$(go env GOPATH)/bin make ocm && make ctf diff --git a/.github/workflows/components_push.yaml b/.github/workflows/components_push.yaml deleted file mode 100644 index 20596003..00000000 --- a/.github/workflows/components_push.yaml +++ /dev/null @@ -1,43 +0,0 @@ -name: component CTFs - -on: - workflow_dispatch: - workflow_call: - secrets: - token: - required: true - -permissions: - contents: read - pull-requests: read - packages: write - -jobs: - build-cli: - name: Build component - runs-on: large_runner - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 - - name: Cache go-build and mod - uses: actions/cache@v4 - with: - path: | - ~/.cache/go-build/ - ~/go/pkg/mod/ - key: go-${{ hashFiles('go.sum') }} - restore-keys: | - go- - - name: Setup Go - uses: actions/setup-go@v5 - with: - go-version-file: '${{ github.workspace }}/go.mod' - - name: CTF - env: - GITHUB_TOKEN: ${{ secrets.token }} - run: | - cd component/ - PATH=$PATH:$(go env GOPATH)/bin make ocm && make ctf && make push diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 860f0014..0b6aa9d7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -19,15 +19,6 @@ jobs: permissions: contents: read pull-requests: 'read' - components: - name: Component CTF Builds - uses: ./.github/workflows/components_push.yaml - permissions: - contents: write - pull-requests: read - packages: write - with: - token: ${{ secrets.GITHUB_TOKEN }} release: needs: tests name: Trigger release build @@ -123,3 +114,8 @@ jobs: helm registry login ghcr.io -u open-component-model -p ${{ secrets.GITHUB_TOKEN }} helm package --version ${{ env.RELEASE_VERSION }} --app-version ${{ env.RELEASE_VERSION }} ./deploy helm push ${{ github.event.repository.name }}-${{ env.RELEASE_VERSION }}.tgz oci://ghcr.io/open-component-model/helm + - name: Push OCM Components + env: + GITHUBORG: ${{ github.repository_owner }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: make plain-push diff --git a/Makefile b/Makefile index d57dabff..4ad20d1d 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,7 @@ PLATFORM_ARCH := $(shell go env GOARCH) GOTESTSUM ?= $(LOCALBIN)/gotestsum MKCERT ?= $(LOCALBIN)/mkcert UNAME ?= $(shell uname|tr '[:upper:]' '[:lower:]') +GEN := $(REPO_ROOT)/gen # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) @@ -161,6 +162,13 @@ dev-deploy: kustomize ## Deploy controller dev image in the configured Kubernete undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. $(KUSTOMIZE) build config/default | kubectl delete --ignore-not-found=$(ignore-not-found) -f - +##@ Component + +.PHONY: plain-push +plain-push: + $(MAKE) -C component ctf + $(OCM) transfer ctf -f $(GEN)/component/ctf $(OCMREPO) + ##@ Documentation api-docs: gen-crd-api-reference-docs ## Generate API reference documentation diff --git a/docs/release_notes/v0.24.12.md b/docs/release_notes/v0.24.12.md new file mode 100644 index 00000000..a50363ef --- /dev/null +++ b/docs/release_notes/v0.24.12.md @@ -0,0 +1,3 @@ +# Release 0.24.12 + +- fix: do plain push from the main release action diff --git a/pkg/version/release.go b/pkg/version/release.go index e90d9648..45e7aeef 100644 --- a/pkg/version/release.go +++ b/pkg/version/release.go @@ -5,7 +5,7 @@ package version // ReleaseVersion is the version number in semver format "vX.Y.Z", prefixed with "v". -var ReleaseVersion = "v0.24.10" +var ReleaseVersion = "v0.24.12" // ReleaseCandidate is the release candidate ID in format "rc.X", which will be appended to the release version. var ReleaseCandidate = "rc.1"