Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add kubebuilder check and update doc.crds.dev update #84

Merged
merged 3 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/go-generate.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Terraform Provider testing workflow.
name: go-generate

# This GitHub action runs your tests for each pull request and push.
Expand All @@ -9,6 +8,10 @@ on:
- 'docs/**'
- 'tools/**'

# Testing only needs permissions to read the repository contents.
permissions:
contents: read

jobs:
generate:
name: Generate
Expand Down
27 changes: 17 additions & 10 deletions .github/workflows/go-proxy.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
name: 'Force pkg.go.dev release sync'
name: 'Force update pkg.go.dev/doc.crds.dev release sync'

on:
release:
types: [published]
release:
types: [published]

jobs:
build:
name: Renew documentation
runs-on:
group: Default
steps:
- name: Pull new module version
uses: andrewslotin/go-proxy-pull-action@master
pkg-go-dev:
name: Renew documentation
runs-on:
group: Default
steps:
- name: Pull new module version
uses: andrewslotin/go-proxy-pull-action@master
doc-crds-dev:
name: Renew documentation
runs-on:
group: Default
steps:
- name: update doc.crds.dev
uses: azrod/doc-crds-dev-update-action@master
2 changes: 2 additions & 0 deletions .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Unit tests

on:
pull_request:
paths:
- '**.go'
workflow_dispatch:

permissions:
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/kubebuilder-generate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: kubebuidler-generate

# This GitHub action runs your tests for each pull request and push.
# Optionally, you can turn it on using a schedule for regular testing.
on:
pull_request:
paths:
- 'api/**'
- 'internal/controller/**'

# only needs permissions to read the repository contents.
permissions:
contents: read

jobs:
kubebuilder:
name: Kube Builder
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # v3.5.0
- uses: actions/setup-go@v5 # v4.0.0
with:
go-version-file: 'go.mod'
- run: make manifests
- run: make generate
- name: git diff
run: |
git diff --compact-summary --exit-code || \
(echo; echo "Unexpected difference in directories after code generation. Run 'make generate and make manifests' command and commit."; exit 1)
18 changes: 17 additions & 1 deletion .github/workflows/new-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,25 @@ jobs:
run: |
git diff --compact-summary --exit-code || \
(echo; echo "Unexpected difference in directories after code generation. Run 'go generate ./...' command and commit."; exit 1)
kubebuilder:
needs: [pre-check]
name: Kube Builder
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # v3.5.0
- uses: actions/setup-go@v5 # v4.0.0
with:
go-version-file: 'go.mod'
- run: make manifests
- run: make generate
- name: git diff
run: |
git diff --compact-summary --exit-code || \
(echo; echo "Unexpected difference in directories after code generation. Run 'make generate and make manifests' command and commit."; exit 1)

# * Step 2: Create a new tag
tag:
needs: [golangci-lint, pre-check, tag-already-exist, testsunit, generate]
needs: [golangci-lint, pre-check, tag-already-exist, testsunit, generate, kubebuilder]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-doc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ jobs:
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material pymdown-extensions mkdocs-video mkdocs-macros-plugin
- run: pip install mkdocs-material pymdown-extensions mkdocs-macros-plugin
- run: mkdocs gh-deploy --force