From 3dde51b96c836b1e0e2bc55d72c9e34470de39f2 Mon Sep 17 00:00:00 2001 From: whywaita Date: Fri, 7 Jun 2024 11:42:02 +0900 Subject: [PATCH 1/2] Update workflows --- .github/workflows/release.yaml | 27 ++++++++++----------------- .github/workflows/test.yaml | 2 +- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9a5a35a..c0eda85 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,41 +9,34 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v6 with: version: latest - args: release --rm-dist + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} docker: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 - - uses: docker/setup-qemu-action@v1 - - uses: docker/setup-buildx-action@v1 - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- + uses: actions/checkout@v4 + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 - name: Login to GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - uses: docker/metadata-action@v3 + - uses: docker/metadata-action@v5 id: meta with: images: ghcr.io/whywaita/myshoes @@ -52,7 +45,7 @@ jobs: type=semver,pattern={{raw}} type=sha - name: Build container image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: push: true tags: ${{ steps.meta.outputs.tags }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 02fb559..34db09a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -20,7 +20,7 @@ jobs: with: fetch-depth: 1 - name: setup go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - name: lint From 25e39eda7dbfe2e3ad77d31bcf68946b0df3642b Mon Sep 17 00:00:00 2001 From: whywaita Date: Fri, 7 Jun 2024 11:49:59 +0900 Subject: [PATCH 2/2] Pin protoc version --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4a58aad..247061e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,8 @@ FROM golang:1.21 AS builder WORKDIR /go/src/github.com/whywaita/myshoes -RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@latest -RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest +RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.1 +RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2.0 RUN apt-get update -y \ && apt-get install -y protobuf-compiler