Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cicd/release): single quotes around go-version in actions/setup-go@v4 #115

Merged

Conversation

miyamo2
Copy link
Contributor

@miyamo2 miyamo2 commented May 12, 2024

WHAT

(Write the change being made with this pull request)

As the title suggests.

WHY

(Write the motivation why you submit this pull request)

This PR is intended to fix the release workflow.

One of the causes for the release workflow not working properly can be attributed to the way of specifying the go version in actions/setup-go.

This is noted in the README of actions/setup-go as follows:

The recommendation is based on the YAML parser's behavior, which interprets non-wrapped values as numbers and, in the case of version 1.20, trims it down to 1.2, which may not be very obvious.

https://github.com/actions/setup-go/blob/4ab57d7ea2fd0c9948210b2e0784e280674e7144/README.md?plain=1#L69-L75

You can confirm that [email protected] is installed from these logs.

Run actions/setup-go@v4
  with:
    go-version: 1.2
    check-latest: false
    token: ***
    cache: true
Setup go version spec 1.2
Attempting to download 1.2...
matching 1.2...
Not found in manifest.  Falling back to download directly from Go
Install from dist
Acquiring go1.2.2 from https://storage.googleapis.com/golang/go1.2.2.linux-amd64.tar.gz
Extracting Go...
/usr/bin/tar xz --warning=no-unknown-keyword --overwrite -C /home/runner/work/_temp/079692ff-a4af-499c-9e26-5532cd7c757c -f /home/runner/work/_temp/1058dbd3-9393-472f-a3e6-d51e4a830391
Successfully extracted go to /home/runner/work/_temp/079692ff-a4af-499c-9e26-5532cd7c757c
Adding to the cache ...
Successfully cached go to /opt/hostedtoolcache/go/1.2.2/x64
Added go to the path
Setting GOROOT for Go version < 1.9
Successfully set up Go version 1.2
/opt/hostedtoolcache/go/1.2.2/x64/bin/go env GOMODCACHE
/opt/hostedtoolcache/go/1.2.2/x64/bin/go env GOCACHE


Warning: Restore cache failed: Could not get cache folder paths.
go version go1.2.2 linux/amd64

go env
  GOARCH="amd64"
  GOBIN=""
  GOCHAR="6"
  GOEXE=""
  GOHOSTARCH="amd64"
  GOHOSTOS="linux"
  GOOS="linux"
  GOPATH=""
  GORACE=""
  GOROOT="/opt/hostedtoolcache/go/1.2.2/x64"
  GOTOOLDIR="/opt/hostedtoolcache/go/1.2.2/x64/pkg/tool/linux_amd64"
  TERM="dumb"
  CC="gcc"
  GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread"
  CXX="g++"
  CGO_ENABLED="1"

https://github.com/mercari/hcledit/actions/runs/8813629424/job/24191778278#step:3:21

Related

Copy link
Contributor

@suzuki-shunsuke suzuki-shunsuke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

@suzuki-shunsuke suzuki-shunsuke self-requested a review May 13, 2024 05:41
Copy link
Contributor

@suzuki-shunsuke suzuki-shunsuke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The base branch requires all commits to be signed. Learn more about signing commits.

Could you sign your commits?

This document may be helpful.

https://github.com/suzuki-shunsuke/oss-contribution-guide/blob/main/docs/commit-signing.md

@miyamo2 miyamo2 force-pushed the fix-cicd-go-ver-spec-at-release branch from b306432 to af22891 Compare May 13, 2024 10:26
@miyamo2
Copy link
Contributor Author

miyamo2 commented May 13, 2024

@suzuki-shunsuke
Thank you for pointing it out.

My apologies.
I rebased them with signed.

And, thanks for the learning that will help me from now on!

@suzuki-shunsuke suzuki-shunsuke self-requested a review May 13, 2024 10:44
Copy link
Contributor

@suzuki-shunsuke suzuki-shunsuke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

@suzuki-shunsuke suzuki-shunsuke merged commit 14a9dd2 into mercari:main May 13, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants