Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify GOPATH settings in GH actions (#552)
* Add local `setup-gopath` github action and reuse it in other workflows * it writes to `$GITHUB_ENV` file to expose new env vars to subsequent steps * it creates a symlink `$GOPATH/src/github.com/uber/jaeger-client-go` and exports it as `$PROJECT` var * other workflows run this action and the only need to do `cd $PROJECT` before running Go commands * fixed the GOPATH issue for #551, but FOSSA fails for other reasons now
- Loading branch information
1 parent
4ab51d8
commit 17fd3e8
Showing
4 changed files
with
77 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: 'Setup GOPATH' | ||
description: 'Link repo into GOPATH and export $PROJECT var' | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup GOPATH | ||
shell: bash | ||
run: | | ||
export GOPATH=$(go env GOPATH) | ||
export PROJECT=$GOPATH/src/github.com/uber/jaeger-client-go | ||
mkdir -p $(dirname $PROJECT) | ||
ln -s $(pwd) $PROJECT | ||
# write to GH files to make vars available to later steps | ||
echo "PROJECT=$PROJECT" >>"$GITHUB_ENV" | ||
echo "GOPATH=$GOPATH" >>"$GITHUB_ENV" | ||
echo "$GOPATH/bin" >>"$GITHUB_PATH" | ||
# print summary | ||
echo "GOPATH=$GOPATH" | ||
echo "PROJECT=$PROJECT" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters