From d311bfe9fd6cbed557f4cf6ab3e656478eb22e77 Mon Sep 17 00:00:00 2001 From: Jacob Gadikian Date: Mon, 8 Aug 2022 23:12:52 +0700 Subject: [PATCH 1/8] Update Dockerfile --- contrib/devtools/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/devtools/Dockerfile b/contrib/devtools/Dockerfile index 05bed5ac81bf..213950ec9e07 100644 --- a/contrib/devtools/Dockerfile +++ b/contrib/devtools/Dockerfile @@ -4,7 +4,7 @@ FROM bufbuild/buf:1.1.0 as BUILDER -FROM golang:1.18-alpine +FROM golang:1.19-alpine RUN apk add --no-cache \ nodejs \ From 74418583e7a7c6c6d62108997820a8718bce67fe Mon Sep 17 00:00:00 2001 From: Jacob Gadikian Date: Mon, 8 Aug 2022 23:32:20 +0700 Subject: [PATCH 2/8] Update proto-docker.yml --- .github/workflows/proto-docker.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/proto-docker.yml b/.github/workflows/proto-docker.yml index dbab7a21cc05..50503f706d68 100644 --- a/.github/workflows/proto-docker.yml +++ b/.github/workflows/proto-docker.yml @@ -4,7 +4,7 @@ on: branches: - main paths: - - "contrib/devtools/dockerfile" + - "contrib/devtools/Dockerfile" permissions: contents: read @@ -31,16 +31,28 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - - name: Login to DockerHub - uses: docker/login-action@v2 + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + if: ${{ github.event_name != 'pull_request' }} with: - username: ${{ secrets.DOCKERHUBTM_USERNAME }} - password: ${{ secrets.DOCKERHUBTM_TOKEN }} + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build + uses: docker/build-push-action@v2 + if: ${{ github.event_name == 'pull_request' }} + with: + file: contrib/devtools/Dockerfile + context: ./contrib/devtools + platforms: linux/amd64,linux/arm64 + push: false - - name: Publish to Docker Hub + - name: Publish to GHCR uses: docker/build-push-action@v3 with: context: ./contrib/devtools platforms: linux/amd64,linux/arm64 push: true tags: ${{ steps.prep.outputs.tags }} + name: ghcr.io/cosmos/proto-builder From d6b6c8ede88374501f77c178c750743c640077e4 Mon Sep 17 00:00:00 2001 From: Jacob Gadikian Date: Mon, 8 Aug 2022 23:35:10 +0700 Subject: [PATCH 3/8] Update Dockerfile --- contrib/devtools/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/devtools/Dockerfile b/contrib/devtools/Dockerfile index 213950ec9e07..d5f4469dc435 100644 --- a/contrib/devtools/Dockerfile +++ b/contrib/devtools/Dockerfile @@ -6,6 +6,7 @@ FROM bufbuild/buf:1.1.0 as BUILDER FROM golang:1.19-alpine + RUN apk add --no-cache \ nodejs \ npm \ From 817bfdd62a87f599fe5395585131f8628ab2fec9 Mon Sep 17 00:00:00 2001 From: Jacob Gadikian Date: Mon, 8 Aug 2022 23:36:59 +0700 Subject: [PATCH 4/8] Update proto-docker.yml --- .github/workflows/proto-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/proto-docker.yml b/.github/workflows/proto-docker.yml index 50503f706d68..fa763f0c159d 100644 --- a/.github/workflows/proto-docker.yml +++ b/.github/workflows/proto-docker.yml @@ -1,4 +1,4 @@ -name: Build & Push SDK Proto Builder +name: ghcr.io/cosmos/proto-builder on: push: branches: From 176c088f40a8b7edc2db5385834cf305e503492b Mon Sep 17 00:00:00 2001 From: Jacob Gadikian Date: Tue, 9 Aug 2022 00:17:19 +0700 Subject: [PATCH 5/8] Update proto-docker.yml --- .github/workflows/proto-docker.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/proto-docker.yml b/.github/workflows/proto-docker.yml index fa763f0c159d..8a6d924fde15 100644 --- a/.github/workflows/proto-docker.yml +++ b/.github/workflows/proto-docker.yml @@ -1,10 +1,13 @@ -name: ghcr.io/cosmos/proto-builder +name: Build & Push SDK Proto Builder on: push: branches: - main paths: - "contrib/devtools/Dockerfile" + pull_request: + paths: + - "contrib/devtools/Dockerfile" permissions: contents: read From a492b342ee994ad9c039a520917919fea398a7e7 Mon Sep 17 00:00:00 2001 From: Jacob Gadikian Date: Tue, 9 Aug 2022 00:20:45 +0700 Subject: [PATCH 6/8] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cad0d2cfd9e5..694bb1cef6bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Improvements +* (ci) [#12854](https://github.com/cosmos/cosmos-sdk/pull/12854) Use ghcr.io to host the proto builder image. Update proto builder image to go 1.19 * (x/bank) [#12706](https://github.com/cosmos/cosmos-sdk/pull/12706) Added the `chain-id` flag to the `AddTxFlagsToCmd` API. There is no longer a need to explicitly register this flag on commands whens `AddTxFlagsToCmd` is already called. * [#12791](https://github.com/cosmos/cosmos-sdk/pull/12791) Bump the math library used in the sdk and replace old usages of sdk.* * (x/params) [#12615](https://github.com/cosmos/cosmos-sdk/pull/12615) Add `GetParamSetIfExists` function to params `Subspace` to prevent panics on breaking changes. From 619ec9e55c429df7914bba4c4938284bef8be159 Mon Sep 17 00:00:00 2001 From: Jacob Gadikian Date: Tue, 9 Aug 2022 00:21:52 +0700 Subject: [PATCH 7/8] Update .github/workflows/proto-docker.yml Co-authored-by: Marko --- .github/workflows/proto-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/proto-docker.yml b/.github/workflows/proto-docker.yml index 8a6d924fde15..d93d3f63f77b 100644 --- a/.github/workflows/proto-docker.yml +++ b/.github/workflows/proto-docker.yml @@ -56,6 +56,6 @@ jobs: with: context: ./contrib/devtools platforms: linux/amd64,linux/arm64 - push: true + push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.prep.outputs.tags }} name: ghcr.io/cosmos/proto-builder From 1af4d372330d572e0b8e5bc8ad35d89d022c40f5 Mon Sep 17 00:00:00 2001 From: Jacob Gadikian Date: Tue, 9 Aug 2022 00:22:29 +0700 Subject: [PATCH 8/8] Update proto-docker.yml --- .github/workflows/proto-docker.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/proto-docker.yml b/.github/workflows/proto-docker.yml index d93d3f63f77b..fb4af6ae130c 100644 --- a/.github/workflows/proto-docker.yml +++ b/.github/workflows/proto-docker.yml @@ -42,14 +42,6 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build - uses: docker/build-push-action@v2 - if: ${{ github.event_name == 'pull_request' }} - with: - file: contrib/devtools/Dockerfile - context: ./contrib/devtools - platforms: linux/amd64,linux/arm64 - push: false - name: Publish to GHCR uses: docker/build-push-action@v3