Skip to content

Commit

Permalink
Merge pull request #450 from Danil-Grigorev/dependabot-generate
Browse files Browse the repository at this point in the history
🌱 Autorun make generate tasks on each dependabot PR and commit the changes to a branch
  • Loading branch information
k8s-ci-robot authored Mar 13, 2024
2 parents a0285da + ea87c6f commit eec2702
Show file tree
Hide file tree
Showing 11 changed files with 11,713 additions and 13,099 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/pr-dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: PR dependabot code generation and go modules fix

# This action runs on other PRs opened by dependabot. It updates modules and generated code on PRs opened by dependabot.
on:
pull_request:
branches:
- dependabot/**
push:
branches:
- dependabot/**
workflow_dispatch:

permissions:
contents: write # Allow to update the PR.

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1
- name: Calculate go version
id: vars
run: echo "go_version=$(make go-version)" >> $GITHUB_OUTPUT
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # tag=v5.0.0
with:
go-version: ${{ steps.vars.outputs.go_version }}
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # tag=v4.0.1
name: Restore go cache
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Update all modules
run: make modules
- name: Update generated code
run: make generate
- uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # tag=v9.1.4
name: Commit changes
with:
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
default_author: github_actor
message: 'Update generated code'
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ IMAGE_REVIEWERS ?= $(shell ./hack/get-project-maintainers.sh)

# Binaries.
# Need to use abspath so we can invoke these from subdirectories
CONTROLLER_GEN_VER := v0.11.4
CONTROLLER_GEN_VER := v0.14.0
CONTROLLER_GEN_BIN := controller-gen
CONTROLLER_GEN := $(TOOLS_BIN_DIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER)

Expand Down Expand Up @@ -548,3 +548,6 @@ test-e2e-run: $(GINKGO) $(ENVSUBST) $(HELM) ## Run e2e tests
-e2e.config="$(E2E_CONF_FILE_ENVSUBST)" -e2e.components=$(RELEASE_DIR)/operator-components.yaml \
-e2e.skip-resource-cleanup=$(SKIP_CLEANUP) -e2e.use-existing-cluster=$(SKIP_CREATE_MGMT_CLUSTER) \
-e2e.helm-binary-path=$(HELM) -e2e.chart-path=$(CHART_PACKAGE_DIR)/cluster-api-operator-$(HELM_CHART_TAG).tgz $(E2E_ARGS)

go-version: ## Print the go version we use to compile our binaries and images
@echo $(GO_VERSION)
1 change: 0 additions & 1 deletion api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion api/v1alpha2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1,239 changes: 583 additions & 656 deletions config/crd/bases/operator.cluster.x-k8s.io_addonproviders.yaml

Large diffs are not rendered by default.

2,475 changes: 1,166 additions & 1,309 deletions config/crd/bases/operator.cluster.x-k8s.io_bootstrapproviders.yaml

Large diffs are not rendered by default.

2,475 changes: 1,166 additions & 1,309 deletions config/crd/bases/operator.cluster.x-k8s.io_controlplaneproviders.yaml

Large diffs are not rendered by default.

2,475 changes: 1,166 additions & 1,309 deletions config/crd/bases/operator.cluster.x-k8s.io_coreproviders.yaml

Large diffs are not rendered by default.

2,475 changes: 1,166 additions & 1,309 deletions config/crd/bases/operator.cluster.x-k8s.io_infrastructureproviders.yaml

Large diffs are not rendered by default.

1,239 changes: 583 additions & 656 deletions config/crd/bases/operator.cluster.x-k8s.io_ipamproviders.yaml

Large diffs are not rendered by default.

12,378 changes: 5,830 additions & 6,548 deletions test/e2e/resources/full-chart-install.yaml

Large diffs are not rendered by default.

0 comments on commit eec2702

Please sign in to comment.