Skip to content

Commit c197536

Browse files
workflows
Signed-off-by: Maximilian Braun (SAP) <[email protected]>
1 parent 94ba00f commit c197536

File tree

4 files changed

+83
-6
lines changed

4 files changed

+83
-6
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Check Go Dependency Licenses
2+
3+
on:
4+
workflow_call:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
license-check:
11+
name: Check licenses of dependencies
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: checkout repo
15+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
17+
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
18+
with:
19+
go-version: '1.21'
20+
21+
- name: Install go-licenses
22+
run: |
23+
go install github.com/google/go-licenses@latest
24+
25+
- name: check licenses
26+
run: |
27+
go-licenses check --allowed_licenses="Apache-2.0,BSD-3-Clause,MIT,MPL-2.0,ISC,BSD-2-Clause" ./...

.github/workflows/reuse-scan.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# This workflow is triggered by the user and runs the REUSE compliance check (reuse lint) on the repository.
2+
3+
name: REUSE Compliance Check
4+
5+
on:
6+
workflow_call:
7+
8+
9+
jobs:
10+
lint-reuse:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
14+
- name: REUSE Compliance Check
15+
uses: fsfe/reuse-action@3ae3c6bdf1257ab19397fab11fd3312144692083 # v4.0.0

.github/workflows/revieewable.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow will run make reviewable and make check-diff as checks
2+
3+
name: Reviewable&Check-Diff
4+
5+
on:
6+
workflow_call:
7+
8+
env:
9+
GO_IMPORT_VERSION: 'v0.16.1'
10+
11+
jobs:
12+
reviewable-checkdiff:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
with:
17+
submodules: true
18+
19+
- name: Set up Go
20+
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
21+
with:
22+
go-version: '1.21'
23+
24+
- name: Install goimports
25+
run: |
26+
cd /tmp
27+
go install golang.org/x/tools/cmd/goimports@${{ env.GO_IMPORT_VERSION }}
28+
29+
- name: Make Reviewable
30+
run: make reviewable
31+
env:
32+
RUNNING_IN_CI: 'true'
33+
- name: Make Check-Diff
34+
run: make check-diff

Makefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ lint-fix:
292292

293293

294294
.PHONY: helm-chart
295-
helm-chart: helm-templates
295+
helm-chart:
296296
OPERATOR_VERSION=$(shell cat VERSION) envsubst < charts/$(PROJECT_FULL_NAME)/Chart.yaml.tpl > charts/$(PROJECT_FULL_NAME)/Chart.yaml
297297
OPERATOR_VERSION=$(shell cat VERSION) envsubst < charts/$(PROJECT_FULL_NAME)/values.yaml.tpl > charts/$(PROJECT_FULL_NAME)/values.yaml
298298

@@ -301,11 +301,6 @@ helm-install-local: docker-build
301301
helm upgrade --install $(PROJECT_FULL_NAME) charts/$(PROJECT_FULL_NAME)/ --set image.repository=$(IMG_BASE) --set image.tag=$(IMG_VERSION) --set image.pullPolicy=Never
302302
$(KIND) load docker-image ${IMG} --name=$(PROJECT_NAME)-dev
303303

304-
.PHONY: helm-templates
305-
helm-templates:
306-
rm -rf charts/$(PROJECT_FULL_NAME)/templates
307-
git clone --depth=1 https://github.tools.sap/cloud-orchestration/operator-helm-templates.git charts/$(PROJECT_FULL_NAME)/templates
308-
rm -rf charts/$(PROJECT_FULL_NAME)/templates/.git
309304

310305

311306
.PHONY: helm-work
@@ -321,6 +316,10 @@ check-diff: generate manifests
321316
@echo checking clean branch
322317
@if git status --porcelain | grep . ; then echo Uncommitted changes found after running make generate manifests. Please ensure you commit all generated files in this branch after running make generate. && false; else echo branch is clean; fi
323318

319+
reviewable:
320+
@$(MAKE) generate
321+
@$(MAKE) lint
322+
@$(MAKE) test
324323
### ------------------------------------ CROSSPLANE ------------------------------------ ###
325324

326325
# Namespace where Crossplane is installed
@@ -336,6 +335,8 @@ crossplane-provider-install:
336335
kubectl wait --for=condition=Healthy provider/provider-helm --timeout=1m
337336
kubectl apply -f crossplane/provider-config.yaml -n $(CROSSPLANE_NAMESPACE)
338337

338+
339+
339340
.PHONY: install-k8s-provider
340341

341342
.PHONY: helm-provider-sample

0 commit comments

Comments
 (0)