From 404471ab5fcc4612dc557384e2f9c7057199309f Mon Sep 17 00:00:00 2001 From: Terry Howe Date: Sun, 17 Nov 2024 08:42:39 -0700 Subject: [PATCH 1/2] chore: Add build workflow for sdkexamples Signed-off-by: Terry Howe --- .github/workflows/build.yml | 34 ++++++++++++++++++++++++++++++++++ .gitignore | 1 + Makefile | 4 ++++ sdkexamples/Makefile | 3 +++ 4 files changed, 42 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 sdkexamples/Makefile diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..c9649798e --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,34 @@ +name: build + +on: + push: + paths: + - sdkexamples/** + branches: + - main + pull_request: + paths: + - sdkexamples/** + branches: + - main + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + go-version: ['1.23'] + fail-fast: true + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4.2.2 + - name: Setup Go ${{ matrix.go-version }} + uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # pin@5.1.0 + with: + go-version: ${{ matrix.go-version }} + check-latest: true + - name: Build sdkexamples + run: make sdkexamples diff --git a/.gitignore b/.gitignore index d5298b3f0..64b1c5c4d 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ app/* resources/ helm.sh/ docs.helm.sh/ +sdkexamples/sdkexamples # JetBrains IDEs (GoLand, IntelliJ, ...) config folder .idea diff --git a/Makefile b/Makefile index 3a48d4628..442b38cb3 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,10 @@ run-link-checker: check-links-ci: set-up-link-checker run-link-checker +.PHONY: sdkexamples +sdkexamples: + cd sdkexamples; make + serve: hugo server --buildDrafts --buildFuture --bind 0.0.0.0 diff --git a/sdkexamples/Makefile b/sdkexamples/Makefile new file mode 100644 index 000000000..b890480d2 --- /dev/null +++ b/sdkexamples/Makefile @@ -0,0 +1,3 @@ +.PHONY: build +build: $(BINDIR)/$(BINNAME) + go build ./... From d9aa321a3297eebd206a106b8048de953da70f78 Mon Sep 17 00:00:00 2001 From: Terry Howe Date: Tue, 28 Jan 2025 06:18:11 -0700 Subject: [PATCH 2/2] chore: update sdkexamples go version Signed-off-by: Terry Howe --- .github/workflows/build.yml | 6 ++---- Makefile | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c9649798e..6b8d4f57d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,16 +19,14 @@ jobs: build: runs-on: ubuntu-latest strategy: - matrix: - go-version: ['1.23'] fail-fast: true steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4.2.2 - - name: Setup Go ${{ matrix.go-version }} + - name: Setup Go sdkexamples/go.mod file uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # pin@5.1.0 with: - go-version: ${{ matrix.go-version }} + go-version-file: 'sdkexamples/go.mod' check-latest: true - name: Build sdkexamples run: make sdkexamples diff --git a/Makefile b/Makefile index 442b38cb3..8276541c1 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ check-links-ci: set-up-link-checker run-link-checker .PHONY: sdkexamples sdkexamples: - cd sdkexamples; make + make -C sdkexamples serve: hugo server --buildDrafts --buildFuture --bind 0.0.0.0