Skip to content

Commit

Permalink
ci: fix gator cli build (open-policy-agent#2657)
Browse files Browse the repository at this point in the history
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
  • Loading branch information
sozercan committed Mar 31, 2023
1 parent 3ff2c54 commit b0af974
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c

- name: Set up Go 1.20
uses: actions/setup-go@v4
with:
go-version: "1.20"

- name: Get tag
id: get_version
run: |
Expand Down Expand Up @@ -83,7 +88,9 @@ jobs:
make e2e-verify-release IMG=${{ env.IMAGE_REPO }}:${TAG} USE_LOCAL_IMG=false
- name: Build gator-cli
shell: bash
run: |
set -e
build() {
export GOOS="$(echo ${1} | cut -d '-' -f 1)"
export GOARCH="$(echo ${1} | cut -d '-' -f 2)"
Expand All @@ -97,11 +104,21 @@ jobs:
tar -czf ${FILENAME}.tar.gz gator*
popd
}
mkdir -p _dist
i=0
for os_arch_extension in $PLATFORMS; do
build ${os_arch_extension} &
build ${os_arch_extension} &
pids[${i}]=$!
((i=i+1))
done
wait
# wait for all pids
for pid in ${pids[*]}; do
wait $pid
done
pushd _dist
# consolidate tar's sha256sum into a single file
find . -type f -name '*.tar.gz' | sort | xargs sha256sum >> sha256sums.txt
Expand Down

0 comments on commit b0af974

Please sign in to comment.