From 49b7ff26b5b7acbfb345939e58c6d65c330fe4f3 Mon Sep 17 00:00:00 2001 From: tungle Date: Tue, 23 Jan 2024 14:24:53 +0700 Subject: [PATCH] fix mismatch go version for github checking --- .github/workflows/build.yml | 26 ++++++++------------- .github/workflows/codeql.yml | 2 +- .github/workflows/interchaintest.yml | 34 ++++++++++++++++------------ .github/workflows/lint.yml | 2 +- .github/workflows/tests.yml | 6 ++--- Dockerfile | 4 +++- 6 files changed, 36 insertions(+), 38 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f6f4bac4f..2ac71a408 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 }} @@ -19,22 +11,22 @@ 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) @@ -42,4 +34,4 @@ jobs: echo "Repository is dirty. Showing 'git status' and 'git --no-pager diff' for debugging now:" git status && git --no-pager diff exit 1 - fi \ No newline at end of file + fi diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 1a631167a..09a43c8e1 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -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 diff --git a/.github/workflows/interchaintest.yml b/.github/workflows/interchaintest.yml index 4529d0fed..54b5dc34d 100644 --- a/.github/workflows/interchaintest.yml +++ b/.github/workflows/interchaintest.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3188ae602..4ff29966a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b78394d8b..55a2a0b76 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 ./... \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 2c129d821..3e31d2e6b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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