Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
29 changes: 20 additions & 9 deletions .github/workflows/docker.yaml → .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: docker
name: build

on:
pull_request:
paths:
- .github/workflows/docker.yaml
- .github/workflows/build.yaml
- Dockerfile
- go.*
- api/**
Expand All @@ -18,7 +18,7 @@ on:
tags:
- v*
paths:
- .github/workflows/docker.yaml
- .github/workflows/build.yaml
- Dockerfile
- go.*
- cmd/**
Expand All @@ -29,7 +29,7 @@ on:
- '!**/*.md'

jobs:
build:
container:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
Expand Down Expand Up @@ -74,13 +74,24 @@ jobs:
with:
metadata: ${{ steps.build.outputs.metadata }}

release:
needs: build
uses: int128/kubebuilder-workflows/.github/workflows/release.yaml@e4ad31a438f188f70bde87827a8dbe466e623dea # v1.5.0
manifest:
needs: container
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
with:
controller-image: ${{ needs.build.outputs.image-uri }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- run: kustomize edit set image controller="$controller_image"
working-directory: config/manager
env:
controller_image: ${{ needs.container.outputs.image-uri }}
- run: kustomize build config/default > "${RUNNER_TEMP}/${GITHUB_REPOSITORY##*/}.yaml"
- run: cat "${RUNNER_TEMP}/${GITHUB_REPOSITORY##*/}.yaml"
- if: github.ref_type == 'tag'
run: gh release upload "$GITHUB_REF_NAME" "${RUNNER_TEMP}/${GITHUB_REPOSITORY##*/}.yaml" --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

e2e-test:
runs-on: ubuntu-latest
Expand Down
32 changes: 20 additions & 12 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,31 @@ on:
- Makefile

jobs:
go:
uses: int128/kubebuilder-workflows/.github/workflows/go.yaml@e4ad31a438f188f70bde87827a8dbe466e623dea # v1.5.0
permissions:
contents: write
pull-requests: write
with:
go-version-file: go.mod
cache-dependency-path: go.sum
test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version-file: go.mod
cache-dependency-path: go.sum
- run: make test
- run: make lint

fix-go-mod-replace:
generate:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version-file: go.mod
cache-dependency-path: go.sum
- run: bash hack/fix_go_mod_replace.sh
- uses: int128/update-generated-files-action@f6dc44e35ce252932e9018f1c38d1e2a4ff80e14 # v2.60.0
- run: make fmt
- run: make generate manifests
- uses: int128/update-generated-files-action@65b9a7ae3ededc5679d78343f58fbebcf1ebd785 # v2.57.0
49 changes: 43 additions & 6 deletions .github/workflows/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,49 @@ on:
- .github/workflows/manifest.yaml

jobs:
manifest:
uses: int128/kubebuilder-workflows/.github/workflows/manifest.yaml@e6411bdb370db1900260cf86e13c20980c3eaa82 # v1
diff:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
pull-requests: write
with:
kustomization: |
config/default/kustomization.yaml
e2e_test/**/kustomization.yaml
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.head_ref }}
path: head
- uses: int128/kustomize-action@b5d955eaf39fd3e02589771d3e695e7550d7f756 # v1.157.0
id: kustomize-head
with:
base-directory: head
write-individual-files: true
kustomization: |
config/default/kustomization.yaml
e2e_test/**/kustomization.yaml

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.base_ref }}
path: base
- uses: int128/kustomize-action@b5d955eaf39fd3e02589771d3e695e7550d7f756 # v1.157.0
id: kustomize-base
with:
base-directory: base
write-individual-files: true
ignore-kustomize-error: true
kustomization: |
config/default/kustomization.yaml
e2e_test/**/kustomization.yaml

- uses: int128/diff-action@db6cce01542cb26e181798736eea1e71f5d36706 # v1.51.0
id: diff
with:
base: ${{ steps.kustomize-base.outputs.directory }}
head: ${{ steps.kustomize-head.outputs.directory }}
comment: false
- uses: int128/comment-action@a20dbdebd79ab886a1e7a20d16bfa7dbaa732e5a # v1.33.0
with:
update-if-exists: replace
post: |
## kustomize diff
${{ steps.diff.outputs.comment-body }}
Loading