From c3ffe4952fefd22d858b5aeb7a40bb7b318c55cd Mon Sep 17 00:00:00 2001 From: killianmuldoon Date: Thu, 3 Aug 2023 15:23:46 +0100 Subject: [PATCH] Update actions for 1.5 and make names consistent Signed-off-by: killianmuldoon --- .github/{dependabot.yml => dependabot.yaml} | 0 .../{dependabot.yml => pr-dependabot.yaml} | 3 ++- ...olangci-lint.yml => pr-golangci-lint.yaml} | 2 +- ...int-docs-pr.yaml => pr-md-link-check.yaml} | 2 +- .../workflows/{verify.yml => pr-verify.yaml} | 2 +- .../workflows/{release.yml => release.yaml} | 0 .../{scan.yml => weekly-image-scan.yaml} | 4 ++-- ...s-weekly.yml => weekly-md-link-check.yaml} | 2 +- ...se-weekly.yml => weekly-test-release.yaml} | 8 +++---- Makefile | 2 +- docs/book/src/reference/jobs.md | 24 +++++++++++-------- docs/release/release-tasks.md | 2 +- 12 files changed, 28 insertions(+), 23 deletions(-) rename .github/{dependabot.yml => dependabot.yaml} (100%) rename .github/workflows/{dependabot.yml => pr-dependabot.yaml} (88%) rename .github/workflows/{golangci-lint.yml => pr-golangci-lint.yaml} (97%) rename .github/workflows/{lint-docs-pr.yaml => pr-md-link-check.yaml} (95%) rename .github/workflows/{verify.yml => pr-verify.yaml} (96%) rename .github/workflows/{release.yml => release.yaml} (100%) rename .github/workflows/{scan.yml => weekly-image-scan.yaml} (91%) rename .github/workflows/{lint-docs-weekly.yml => weekly-md-link-check.yaml} (93%) rename .github/workflows/{test-release-weekly.yml => weekly-test-release.yaml} (85%) diff --git a/.github/dependabot.yml b/.github/dependabot.yaml similarity index 100% rename from .github/dependabot.yml rename to .github/dependabot.yaml diff --git a/.github/workflows/dependabot.yml b/.github/workflows/pr-dependabot.yaml similarity index 88% rename from .github/workflows/dependabot.yml rename to .github/workflows/pr-dependabot.yaml index 8b55c95d95e6..d3b2f1d635a4 100644 --- a/.github/workflows/dependabot.yml +++ b/.github/workflows/pr-dependabot.yaml @@ -1,5 +1,6 @@ -name: dependabot +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: diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/pr-golangci-lint.yaml similarity index 97% rename from .github/workflows/golangci-lint.yml rename to .github/workflows/pr-golangci-lint.yaml index dc8c2f1ae2b6..b5dbbaa98010 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/pr-golangci-lint.yaml @@ -1,4 +1,4 @@ -name: golangci-lint +name: PR golangci-lint on: pull_request: diff --git a/.github/workflows/lint-docs-pr.yaml b/.github/workflows/pr-md-link-check.yaml similarity index 95% rename from .github/workflows/lint-docs-pr.yaml rename to .github/workflows/pr-md-link-check.yaml index 93a5b16ef0a1..87154aacac3e 100644 --- a/.github/workflows/lint-docs-pr.yaml +++ b/.github/workflows/pr-md-link-check.yaml @@ -1,4 +1,4 @@ -name: Check PR Markdown links +name: PR check Markdown links on: pull_request: diff --git a/.github/workflows/verify.yml b/.github/workflows/pr-verify.yaml similarity index 96% rename from .github/workflows/verify.yml rename to .github/workflows/pr-verify.yaml index 40a09e150a05..0f476079a657 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/pr-verify.yaml @@ -1,4 +1,4 @@ -name: verify +name: PR verify on: pull_request_target: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yaml similarity index 100% rename from .github/workflows/release.yml rename to .github/workflows/release.yaml diff --git a/.github/workflows/scan.yml b/.github/workflows/weekly-image-scan.yaml similarity index 91% rename from .github/workflows/scan.yml rename to .github/workflows/weekly-image-scan.yaml index 5d727684c9f8..cac026712a09 100644 --- a/.github/workflows/scan.yml +++ b/.github/workflows/weekly-image-scan.yaml @@ -1,4 +1,4 @@ -name: scan-images +name: Weekly image scan on: schedule: @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - branch: [ main, release-1.4, release-1.3 ] + branch: [ main, release-1.5, release-1.4 ] name: Trivy runs-on: ubuntu-latest steps: diff --git a/.github/workflows/lint-docs-weekly.yml b/.github/workflows/weekly-md-link-check.yaml similarity index 93% rename from .github/workflows/lint-docs-weekly.yml rename to .github/workflows/weekly-md-link-check.yaml index 7323b58a385b..2594366b242b 100644 --- a/.github/workflows/lint-docs-weekly.yml +++ b/.github/workflows/weekly-md-link-check.yaml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - branch: [ main, release-1.4, release-1.3 ] + branch: [ main, release-1.5, release-1.4 ] runs-on: ubuntu-latest steps: - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # tag=v3.5.3 diff --git a/.github/workflows/test-release-weekly.yml b/.github/workflows/weekly-test-release.yaml similarity index 85% rename from .github/workflows/test-release-weekly.yml rename to .github/workflows/weekly-test-release.yaml index 8b6ec50d819f..0c4c6f66249a 100644 --- a/.github/workflows/test-release-weekly.yml +++ b/.github/workflows/weekly-test-release.yaml @@ -1,7 +1,7 @@ -name: Release test +name: Weekly release test -# Note: This workflow does not build for releases. It attempts to build release binaries daily to ensure the repo -# is in a good state. +# Note: This workflow does not build for releases. It attempts to build release binaries periodically to ensure the repo +# release machinery is in a good state. on: schedule: @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - branch: [ main, release-1.4, release-1.3 ] + branch: [ main, release-1.5, release-1.4 ] runs-on: ubuntu-latest steps: - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # tag=v3.5.3 diff --git a/Makefile b/Makefile index 623542f32017..cffd70281e01 100644 --- a/Makefile +++ b/Makefile @@ -160,7 +160,7 @@ GINKGO := $(abspath $(TOOLS_BIN_DIR)/$(GINKGO_BIN)-$(GINGKO_VER)) GINKGO_PKG := github.com/onsi/ginkgo/v2/ginkgo GOLANGCI_LINT_BIN := golangci-lint -GOLANGCI_LINT_VER := $(shell cat .github/workflows/golangci-lint.yml | grep [[:space:]]version: | sed 's/.*version: //') +GOLANGCI_LINT_VER := $(shell cat .github/workflows/pr-golangci-lint.yaml | grep [[:space:]]version: | sed 's/.*version: //') GOLANGCI_LINT := $(abspath $(TOOLS_BIN_DIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER)) GOLANGCI_LINT_PKG := github.com/golangci/golangci-lint/cmd/golangci-lint diff --git a/docs/book/src/reference/jobs.md b/docs/book/src/reference/jobs.md index 8be7f50ef3ae..ba4bb9ca44cc 100644 --- a/docs/book/src/reference/jobs.md +++ b/docs/book/src/reference/jobs.md @@ -37,23 +37,27 @@ Prow Presubmits: * [pull-cluster-api-e2e-scale-main-experimental] `./scripts/ci-e2e-scale.sh` GitHub Presubmit Workflows: -* golangci-lint: golangci/golangci-lint-action +* PR golangci-lint: golangci/golangci-lint-action * Runs golangci-lint. Can be run locally via `make lint`. -* verify: kubernetes-sigs/kubebuilder-release-tools verifier +* PR verify: kubernetes-sigs/kubebuilder-release-tools verifier * Verifies the PR titles have a valid format, i.e. contains one of the valid icons. * Verifies the PR description is valid, i.e. is long enough. -* Check PR Markdown links (run when markdown files changed) - * Checks markdown for broken links. -* dependabot (run on dependabot PRs) +* PR check Markdown links (run when markdown files changed) + * Checks markdown modified in PR for broken links. +* PR dependabot (run on dependabot PRs) * Regenerates Go modules and code. -* release (run on tags) - * Creates a GitHub release with release notes for the tag. GitHub Weekly Workflows: -* golangci-lint: golangci/golangci-lint-action - * Weekly check all Markdown links -* scan-images: +* Weekly check all Markdown links + * Checks markdown across the repo for broken links. +* Weekly image scan: * Scan all images for vulnerabilities. Can be run locally via `make verify-container-images` +* Weekly release test: + * Test the the `release` make target is working without errors. + +Other Github workflows +* release (runs when tags are pushed) + * Creates a GitHub release with release notes for the tag. ### Postsubmits diff --git a/docs/release/release-tasks.md b/docs/release/release-tasks.md index b3f0a30679f8..4fd90f92ddd6 100644 --- a/docs/release/release-tasks.md +++ b/docs/release/release-tasks.md @@ -426,7 +426,7 @@ While we add test coverage for the new release branch we will also drop the test 3. Remove tests for old release branches according to our policy documented in [Support and guarantees](../../CONTRIBUTING.md#support-and-guarantees) For example, let's assume we just created tests for v1.4, then we can now drop test coverage for the release-1.1 branch. 4. Verify the jobs and dashboards a day later by taking a look at: `https://testgrid.k8s.io/sig-cluster-lifecycle-cluster-api-1.4` -5. Update `.github/workflows/scan.yml` - to setup Trivy scanning - `.github/workflows/lint-docs-weekly.yml` - to setup link checking in the CAPI book - and `.github/workflows/test-release-weekly.yml` - to verify the release target is working - for the currently supported branches. +5. Update `.github/workflows/weekly-image-scan.yaml` - to setup Trivy scanning - `.github/workflows/weekly-md-link-check.yaml` - to setup link checking in the CAPI book - and `.github/workflows/weekly-test-release.yaml` - to verify the release target is working - for the currently supported branches. Prior art: