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 49b7ff2
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 38 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
34 changes: 19 additions & 15 deletions .github/workflows/interchaintest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,21 @@ permissions:
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
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:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
logout: false
- name: Build and push
id: build_push_image
uses: docker/build-push-action@v3
Expand All @@ -33,15 +37,15 @@ jobs:
push: true
platforms: linux/amd64
tags: |
ghcr.io/notional-labs/centauri-ictest:latest
ghcr.io/composablefi/centauri-ictest:latest
test-start-cosmos-chain:
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 +58,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 +74,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 +90,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 +106,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 +122,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 49b7ff2

Please sign in to comment.