From 8167453892cea56a253d50c8fb820707f0dd9434 Mon Sep 17 00:00:00 2001 From: Duologic Date: Mon, 2 Dec 2024 16:00:22 +0100 Subject: [PATCH] ci: always run make build - set shell - setup jrsonnet - setup jsonnetfmt --- .github/workflows/build.yaml | 20 +++++++++++++++++--- Makefile | 1 + 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6454b93..2947218 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -27,17 +27,31 @@ jobs: version: ${{ github.event.inputs.version }} command: -h + - name: move crossplane cli + run: "mkdir -p $TARGET_PATH && mv ./crossplane $TARGET_PATH" + env: + TARGET_PATH: "${{ github.workspace }}/bin" + + - name: setup jsonnet-fmt + run: | + go install "github.com/google/go-jsonnet/cmd/jsonnetfmt@v0.20.0" + echo "$HOME/go/bin" >> "$GITHUB_PATH" + + - name: setup jrsonnet + uses: Duologic/tanka-exporter-workflow/.github/actions/jrsonnet-install@main + - name: Build xpkg - run: make build + run: "make -B build" + shell: bash env: - CROSSPLANE: './crossplane' + CROSSPLANE: '${{ github.workspace }}/bin/crossplane' - name: Check if file changed id: changed uses: tj-actions/verify-changed-files@v20 with: files: | - !crossplane + !bin - name: No files changed if: "${{ steps.changed.outputs.files_changed == 'true' }}" diff --git a/Makefile b/Makefile index 50289f3..6368025 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ PROVIDER_VERSION:=0.21.0 JSONNET_BIN:=jrsonnet CROSSPLANE?=crank REGISTRY?=ghcr.io +SHELL:=/bin/bash VENDOR_DEPTHS:=$(shell find generator/vendor -type f)