Skip to content

Commit

Permalink
fix mismatch go version for github checking
Browse files Browse the repository at this point in the history
  • Loading branch information
tungleanh0902 committed Jan 24, 2024
1 parent 1dc4c25 commit 86a7bd5
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 37 deletions.
26 changes: 9 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
---
on:
push:
paths:
- '**.go'
- 'go.sum'
pull_request:
paths:
- '**.go'
- 'go.sum'
name: build
on: [push, pull_request]
name: Build

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -19,27 +11,27 @@ jobs:
runs-on: ubuntu-latest
name: build
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: '1.20'
- run: go build ./...

tidy:
runs-on: ubuntu-latest
name: tidy
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: '1.20'
- run: |
go mod tidy
CHANGES_IN_REPO=$(git status --porcelain)
if [[ -n "$CHANGES_IN_REPO" ]]; then
echo "Repository is dirty. Showing 'git status' and 'git --no-pager diff' for debugging now:"
git status && git --no-pager diff
exit 1
fi
fi
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.20
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/interchaintest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand All @@ -38,10 +38,10 @@ jobs:
runs-on: ubuntu-latest
needs: build-and-push-image
steps:
- name: Set up Go 1.19
- name: Set up Go 1.20
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: '1.20'

- name: checkout code
uses: actions/checkout@v3
Expand All @@ -54,10 +54,10 @@ jobs:
runs-on: ubuntu-latest
needs: build-and-push-image
steps:
- name: Set up Go 1.19
- name: Set up Go 1.20
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: '1.20'

- name: checkout code
uses: actions/checkout@v3
Expand All @@ -70,10 +70,10 @@ jobs:
runs-on: ubuntu-latest
needs: build-and-push-image
steps:
- name: Set up Go 1.19
- name: Set up Go 1.20
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: '1.20'

- name: checkout code
uses: actions/checkout@v3
Expand All @@ -86,10 +86,10 @@ jobs:
runs-on: ubuntu-latest
needs: build-and-push-image
steps:
- name: Set up Go 1.19
- name: Set up Go 1.20
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: '1.20'

- name: checkout code
uses: actions/checkout@v3
Expand All @@ -102,10 +102,10 @@ jobs:
# runs-on: ubuntu-latest
# needs: build-and-push-image
# steps:
# - name: Set up Go 1.19
# - name: Set up Go 1.20
# uses: actions/setup-go@v3
# with:
# go-version: 1.19
# go-version: 1.20

# - name: checkout code
# uses: actions/checkout@v3
Expand All @@ -118,10 +118,10 @@ jobs:
# runs-on: ubuntu-latest
# needs: build-and-push-image
# steps:
# - name: Set up Go 1.19
# - name: Set up Go 1.20
# uses: actions/setup-go@v3
# with:
# go-version: 1.19
# go-version: 1.20

# - name: checkout code
# uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: "1.20"
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
name: test
steps:
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: '1.20'
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Test
run: go test ./...
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ ARG RUNNER_IMAGE="gcr.io/distroless/static-debian11"
# Builder
# --------------------------------------------------------

FROM golang:${GO_VERSION}-alpine as builder
FROM golang:${GO_VERSION}-alpine3.18 as builder

ARG GIT_VERSION
ARG GIT_COMMIT

RUN apk add --no-cache \
ca-certificates \
musl-dev \
openssl-dev \
build-base \
linux-headers

Expand Down

0 comments on commit 86a7bd5

Please sign in to comment.