From bfc26035832faad31b328ce58b903288dba11132 Mon Sep 17 00:00:00 2001 From: utahta Date: Wed, 18 Dec 2024 10:31:14 +0900 Subject: [PATCH] bump go version to 1.23 --- .github/workflows/build_and_test.yaml | 2 +- .github/workflows/release.yaml | 30 ++++++++++++++------------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build_and_test.yaml b/.github/workflows/build_and_test.yaml index 748ccff..ab3624f 100644 --- a/.github/workflows/build_and_test.yaml +++ b/.github/workflows/build_and_test.yaml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: - go-version: '1.21' + go-version: '1.23' - run: go version - run: make setup-emulator - name: make test with Cloud Spanner Emulator diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 16204e1..ca76d87 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -4,9 +4,11 @@ on: push: tags: - '*' + branches: + - bump-go-version-to-1.23 env: - GO_VERSION: "~1.21" + GO_VERSION: "~1.23" jobs: goreleaser: @@ -45,16 +47,16 @@ jobs: fetch-depth: 0 - name: Build image run: docker build . --file Dockerfile --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - - name: Log in to registry - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - name: Push image - run: | - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - [ "$VERSION" == "main" ] && VERSION=latest - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION +# - name: Log in to registry +# run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin +# - name: Push image +# run: | +# IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME +# IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') +# VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') +# [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') +# [ "$VERSION" == "main" ] && VERSION=latest +# echo IMAGE_ID=$IMAGE_ID +# echo VERSION=$VERSION +# docker tag $IMAGE_NAME $IMAGE_ID:$VERSION +# docker push $IMAGE_ID:$VERSION