Skip to content

Commit 949e46f

Browse files
NotNotQuinnEeems
andauthored
Update golang to v1.20.7 (#25)
* Update golang to v1.20.7 --------- Co-authored-by: Nathaniel van Diepen <Eeems@users.noreply.github.com>
1 parent 5f22d0d commit 949e46f

4 files changed

Lines changed: 59 additions & 48 deletions

File tree

.github/workflows/build.yml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
name: build
22
on:
3-
push:
4-
branches:
5-
- v1.x
6-
- v2.x
7-
- v3.x
3+
push:
4+
branches:
5+
- v1.x
6+
- v2.x
7+
- v3.x
88
jobs:
9-
build:
10-
name: Publish latest
11-
runs-on: ubuntu-latest
12-
steps:
13-
- name: Checkout the Git repository
14-
uses: actions/checkout@v2
15-
- name: Build and publish images
16-
run: |
17-
echo "${{ secrets.CR_PAT }}" | docker login ghcr.io -u matteodelabre --password-stdin
18-
./scripts/build -p .
9+
build:
10+
name: Publish latest
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout the Git repository
14+
uses: actions/checkout@v3
15+
- name: Login to Docker Hub
16+
uses: docker/login-action@v2
17+
with:
18+
repository: ghcr.io
19+
username: matteodelabre
20+
password: ${{ secrets.CR_PAT }}
21+
- name: Build and publish images
22+
run: |
23+
./scripts/build -p .

.github/workflows/pr.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
name: pr
22
on:
3-
pull_request:
4-
branches:
5-
- v1.x
6-
- v2.x
7-
- v3.x
3+
pull_request:
4+
branches:
5+
- v1.x
6+
- v2.x
7+
- v3.x
88
jobs:
9-
build:
10-
name: Publish latest
11-
runs-on: ubuntu-latest
12-
steps:
13-
- name: Checkout the Git repository
14-
uses: actions/checkout@v2
15-
- name: Build images
16-
run: |
17-
echo "${{ secrets.CR_PAT }}" | docker login ghcr.io -u matteodelabre --password-stdin
18-
./scripts/build .
9+
build:
10+
name: Publish latest
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
steps:
15+
- name: Checkout the Git repository
16+
uses: actions/checkout@v3
17+
- name: Build images
18+
run: |
19+
./scripts/build .

.github/workflows/release.yml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
name: release
22
on:
3-
push:
4-
tags:
5-
- '*'
3+
push:
4+
tags:
5+
- '*'
66
jobs:
7-
release:
8-
name: Publish a release
9-
runs-on: ubuntu-latest
10-
steps:
11-
- name: Checkout the Git repository
12-
uses: actions/checkout@v2
13-
- name: Build and publish images
14-
run: |
15-
echo "${{ secrets.CR_PAT }}" | docker login ghcr.io -u matteodelabre --password-stdin
16-
version="$(echo "${{ github.ref }}" | cut -d / -f 3)"
17-
./scripts/build -p . "$version"
7+
release:
8+
name: Publish a release
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout the Git repository
12+
uses: actions/checkout@v3
13+
- name: Login to Docker Hub
14+
uses: docker/login-action@v2
15+
with:
16+
repository: ghcr.io
17+
username: matteodelabre
18+
password: ${{ secrets.CR_PAT }}
19+
- name: Build and publish images
20+
run: |
21+
version="$(echo "${{ github.ref }}" | cut -d / -f 3)"
22+
./scripts/build -p . "$version"

golang/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ FROM $FROM
55
# Install golang
66
RUN cd /root \
77
&& curl --proto '=https' --tlsv1.2 -sSf \
8-
https://dl.google.com/go/go1.17.1.linux-amd64.tar.gz \
9-
-o go1.17.1.linux-amd64.tar.gz \
10-
&& tar -C /usr/local -xzf go1.17.1.linux-amd64.tar.gz \
8+
https://dl.google.com/go/go1.20.7.linux-amd64.tar.gz \
9+
-o go1.20.7.linux-amd64.tar.gz \
10+
&& tar -C /usr/local -xzf go1.20.7.linux-amd64.tar.gz \
1111
&& mkdir go \
12-
&& rm go1.17.1.linux-amd64.tar.gz
12+
&& rm go1.20.7.linux-amd64.tar.gz
1313

1414
# Add go binaries to PATH
1515
ENV PATH="$PATH:/usr/local/go/bin"

0 commit comments

Comments
 (0)