Skip to content

Commit

Permalink
Update go version (#355)
Browse files Browse the repository at this point in the history
* Automatically get the latest go version when building the image

* Update cron from Monday to Thursday (seems like go releaes
tuesdays/wednesdays)
  • Loading branch information
brayanhenao committed Feb 21, 2024
1 parent 2500fa3 commit 6e33395
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build-buildpacks-ci-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build buildpacks-ci docker image
on:
workflow_dispatch: { }
schedule:
- cron: "0 1 * * 1"
- cron: "0 1 * * 4"
push:
branches: [ master ]
paths: [ Dockerfile, config/**, build/** , Gemfile, Gemfile.lock ]
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ RUN cd /usr/local \
&& tar xf go.tar.gz \
&& rm go.tar.gz

RUN export GO_VERSION=$(wget -qO- https://golang.org/dl/?mode=json | grep -oP '"version": "\K([^"]+)' | head -n 1) && \
wget -q https://golang.org/dl/go$GO_VERSION.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go$GO_VERSION.linux-amd64.tar.gz

ENV GOROOT=/usr/local/go
ENV GOPATH=/go
ENV PATH=$GOPATH/bin:$GOROOT/bin:$PATH
Expand Down

0 comments on commit 6e33395

Please sign in to comment.