File tree Expand file tree Collapse file tree 4 files changed +53
-5
lines changed
Expand file tree Collapse file tree 4 files changed +53
-5
lines changed Original file line number Diff line number Diff line change 1+ name : Install Go Tools
2+ description : " Install Go Tools for pipeline"
3+ inputs :
4+ go-version :
5+ description : " Go version to install"
6+ required : true
7+ runs :
8+ using : " composite"
9+ steps :
10+ - name : Install Go ${{ inputs.go-version }}
11+ uses : actions/setup-go@v5
12+ with :
13+ go-version : ${{ inputs.go-version }}
14+ - name : Install project tools and dependencies
15+ shell : bash
16+ run : make project-tools
Original file line number Diff line number Diff line change @@ -26,18 +26,18 @@ jobs:
2626 - name : Unshallow clone for tags
2727 run : git fetch --prune --unshallow --tags
2828
29- - name : Install Go ${{ env.GO_VERSION }}
30- uses : actions/setup-go@v5
31- with :
32- go-version : ${{ env.GO_VERSION }}
33-
3429 - name : Install pulumictl
3530 uses : jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # tag=v2.1.0
3631 with :
3732 repo : pulumi/pulumictl
3833
3934 - name : Install pulumi
4035 uses : pulumi/actions@v4
36+
37+ - name : Install Go Tools
38+ uses : ./.github/actions/gotools
39+ with :
40+ go-version : ${{ env.GO_VERSION }}
4141
4242 - name : Build sdks
4343 run : make build
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ NODE_MODULE_NAME := @pulumi/${PACK}
88TF_NAME := ${PACK}
99PROVIDER_PATH := provider
1010VERSION_PATH := ${PROVIDER_PATH}/pkg/version.Version
11+ ROOT_DIR ?= $(shell git rev-parse --show-toplevel)
12+ SCRIPTS_BASE ?= $(ROOT_DIR ) /scripts
1113
1214JAVA_GEN := pulumi-java-gen
1315JAVA_GEN_VERSION := v0.8.0
@@ -142,3 +144,10 @@ test::
142144
143145fmt :
144146 @gofmt -s -w .
147+
148+ # SETUP AND TOOL INITIALIZATION TASKS
149+ project-help :
150+ @$(SCRIPTS_BASE ) /project.sh help
151+
152+ project-tools :
153+ @$(SCRIPTS_BASE ) /project.sh tools
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # This script is used to manage the project, only used for installing the required tools for now
4+ # Usage: ./project.sh [action]
5+ # * tools: Install required tools to run the project
6+ set -eo pipefail
7+
8+ ROOT_DIR_PROVIDER=$( git rev-parse --show-toplevel) /provider
9+
10+ action=$1
11+
12+ if [ " $action " = " help" ]; then
13+ [ -f " $0 " .man ] && man " $0 " .man || echo " No help, please read the script in ${script} , we will add help later"
14+ elif [ " $action " = " tools" ]; then
15+ cd ${ROOT_DIR_PROVIDER}
16+
17+ go mod download
18+
19+ go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62.0
20+ go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs@v0.21.0
21+ else
22+ echo " Invalid action: '$action ', please use $0 help for help"
23+ fi
You can’t perform that action at this time.
0 commit comments