Skip to content

Commit

Permalink
Install Go manually in the GitStream container (kubernetes-sigs#145)
Browse files Browse the repository at this point in the history
The setup-go action does not work on Alpine Linux, the base image for
the GitStream container. Install Go manually and leverage caching to
avoid downloading at every run.
qbarrand authored Nov 27, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent feb2f2b commit 17c5baf
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/gitstream.yml
Original file line number Diff line number Diff line change
@@ -16,6 +16,8 @@ jobs:
gitstream:
name: Run GitStream
runs-on: ubuntu-latest
env:
GO_RELEASE: go1.19.3.linux-amd64.tar.gz

container:
image: ghcr.io/qbarrand/gitstream:main
@@ -35,10 +37,21 @@ jobs:
ref: main
path: _gitstream_downstream

- name: Setup Go
uses: actions/setup-go@v3
- name: Cache the Go archive
id: cache-go
uses: actions/cache@v3
with:
go-version: '1.19'
path: /usr/local/go
key: ${{ env.GO_RELEASE }}

- name: Download and install Go
run: |
rm -rf /usr/local/go
wget -O- https://go.dev/dl/${GO_RELEASE} | tar -C /usr/local -xz
if: steps.cache-go.outputs.cache-hit != 'true'

- name: Add Go to PATH
run: echo "PATH=${PATH}" >> $GITHUB_ENV

- name: Bring upstream commits
run: gitstream sync

0 comments on commit 17c5baf

Please sign in to comment.