Skip to content

Commit 36361dd

Browse files
Simplify steps in the build/install portion of workflow
PATH is handled by `setup-go` so we can refactor the code setting it. Also we are taking advantage of the -C switch to handle building from the cloned repository. Co-authored-by: Nick <[email protected]>
1 parent f5fa0ff commit 36361dd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,9 @@ jobs:
139139
$TERRAFORM_DOCS_REPO_URL /tmp/terraform-docs
140140
- name: Build and install terraform-docs binary
141141
run: |
142-
cd /tmp/terraform-docs
143-
GOBIN=$(go env GOPATH)/bin
144-
go build -o $GOBIN/terraform-docs
145-
echo "$GOBIN" >> $GITHUB_PATH
142+
go build \
143+
-C /tmp/terraform-docs \
144+
-o $(go env GOPATH)/bin/terraform-docs
146145
- name: Install dependencies
147146
run: |
148147
python -m pip install --upgrade pip setuptools wheel

0 commit comments

Comments
 (0)