Skip to content

Commit

Permalink
Update golang to v1.20.7 (#25)
Browse files Browse the repository at this point in the history
* Update golang to v1.20.7

---------

Co-authored-by: Nathaniel van Diepen <Eeems@users.noreply.github.com>
  • Loading branch information
NotNotQuinn and Eeems authored Aug 17, 2023
1 parent 5f22d0d commit 949e46f
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 48 deletions.
35 changes: 20 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
name: build
on:
push:
branches:
- v1.x
- v2.x
- v3.x
push:
branches:
- v1.x
- v2.x
- v3.x
jobs:
build:
name: Publish latest
runs-on: ubuntu-latest
steps:
- name: Checkout the Git repository
uses: actions/checkout@v2
- name: Build and publish images
run: |
echo "${{ secrets.CR_PAT }}" | docker login ghcr.io -u matteodelabre --password-stdin
./scripts/build -p .
build:
name: Publish latest
runs-on: ubuntu-latest
steps:
- name: Checkout the Git repository
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
repository: ghcr.io
username: matteodelabre
password: ${{ secrets.CR_PAT }}
- name: Build and publish images
run: |
./scripts/build -p .
31 changes: 16 additions & 15 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
name: pr
on:
pull_request:
branches:
- v1.x
- v2.x
- v3.x
pull_request:
branches:
- v1.x
- v2.x
- v3.x
jobs:
build:
name: Publish latest
runs-on: ubuntu-latest
steps:
- name: Checkout the Git repository
uses: actions/checkout@v2
- name: Build images
run: |
echo "${{ secrets.CR_PAT }}" | docker login ghcr.io -u matteodelabre --password-stdin
./scripts/build .
build:
name: Publish latest
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout the Git repository
uses: actions/checkout@v3
- name: Build images
run: |
./scripts/build .
33 changes: 19 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
name: release
on:
push:
tags:
- '*'
push:
tags:
- '*'
jobs:
release:
name: Publish a release
runs-on: ubuntu-latest
steps:
- name: Checkout the Git repository
uses: actions/checkout@v2
- name: Build and publish images
run: |
echo "${{ secrets.CR_PAT }}" | docker login ghcr.io -u matteodelabre --password-stdin
version="$(echo "${{ github.ref }}" | cut -d / -f 3)"
./scripts/build -p . "$version"
release:
name: Publish a release
runs-on: ubuntu-latest
steps:
- name: Checkout the Git repository
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
repository: ghcr.io
username: matteodelabre
password: ${{ secrets.CR_PAT }}
- name: Build and publish images
run: |
version="$(echo "${{ github.ref }}" | cut -d / -f 3)"
./scripts/build -p . "$version"
8 changes: 4 additions & 4 deletions golang/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ FROM $FROM
# Install golang
RUN cd /root \
&& curl --proto '=https' --tlsv1.2 -sSf \
https://dl.google.com/go/go1.17.1.linux-amd64.tar.gz \
-o go1.17.1.linux-amd64.tar.gz \
&& tar -C /usr/local -xzf go1.17.1.linux-amd64.tar.gz \
https://dl.google.com/go/go1.20.7.linux-amd64.tar.gz \
-o go1.20.7.linux-amd64.tar.gz \
&& tar -C /usr/local -xzf go1.20.7.linux-amd64.tar.gz \
&& mkdir go \
&& rm go1.17.1.linux-amd64.tar.gz
&& rm go1.20.7.linux-amd64.tar.gz

# Add go binaries to PATH
ENV PATH="$PATH:/usr/local/go/bin"
Expand Down

0 comments on commit 949e46f

Please sign in to comment.