diff --git a/.github/workflows/force-bump-pr-manual.yaml b/.github/workflows/force-bump-pr-manual.yaml new file mode 100644 index 0000000..8033403 --- /dev/null +++ b/.github/workflows/force-bump-pr-manual.yaml @@ -0,0 +1,14 @@ +name: Manually Trigger a Force Bump PR + +on: + workflow_dispatch: + +jobs: + call-build-workflow: + uses: openstack-k8s-operators/openstack-k8s-operators-ci/.github/workflows/force-bump-pull-request.yaml@main + with: + operator_name: lightspeed + branch_name: ${{ github.ref_name }} + custom_image: quay.io/openstack-k8s-operators/openstack-k8s-operators-ci-build-tools:golang-1.26-sdk-1.42.3 + secrets: + FORCE_BUMP_PULL_REQUEST_PAT: ${{ secrets.FORCE_PULL_REQUEST_PAT }} diff --git a/.github/workflows/force-bump-pr-scheduled.yaml b/.github/workflows/force-bump-pr-scheduled.yaml new file mode 100644 index 0000000..c43527a --- /dev/null +++ b/.github/workflows/force-bump-pr-scheduled.yaml @@ -0,0 +1,15 @@ +name: Scheduled Force Bump PR + +on: + schedule: + - cron: '0 10 * * 6' # 10AM UTC Saturday + +jobs: + call-build-workflow: + if: github.ref == 'refs/heads/main' && github.repository_owner == 'openstack-k8s-operators' + uses: openstack-k8s-operators/openstack-k8s-operators-ci/.github/workflows/force-bump-branches.yaml@main + with: + operator_name: lightspeed + custom_image: quay.io/openstack-k8s-operators/openstack-k8s-operators-ci-build-tools:golang-1.26-sdk-1.42.3 + secrets: + FORCE_BUMP_PULL_REQUEST_PAT: ${{ secrets.FORCE_PULL_REQUEST_PAT }} diff --git a/Makefile b/Makefile index 4b41986..483eb91 100644 --- a/Makefile +++ b/Makefile @@ -69,6 +69,8 @@ IMG ?= $(IMAGE_TAG_BASE):latest # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. ENVTEST_K8S_VERSION = 1.30.0 +BRANCH ?= main + # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) GOBIN=$(shell go env GOPATH)/bin @@ -117,6 +119,12 @@ manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and Cust generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." +.PHONY: force-bump +force-bump: ## Force bump after tagging + for dep in $$(cat go.mod | grep openstack-k8s-operators | grep -vE -- 'indirect|lightspeed-operator|^replace|^//' | awk '{print $$1}'); do \ + go get $$dep@$(BRANCH) ; \ + done + .PHONY: fmt fmt: ## Run go fmt against code. go fmt ./...