Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.

feat: specify Go version #32

Merged
merged 1 commit into from
Apr 24, 2020
Merged

Conversation

mmailhos
Copy link
Contributor

@mmailhos mmailhos commented Apr 23, 2020

This would fix errors when parsing go.mod due to a Go version mismatch.
Ref: #31

@mmailhos
Copy link
Contributor Author

mmailhos commented Apr 23, 2020

Actually Github Actions does not support build-arg.
Feature Request
Docker Actions runs syntax

I'll be doing some more test and see if we can have a work-around.

@mmailhos mmailhos force-pushed the feat/specify-go-version branch 2 times, most recently from 695489a to b94f3b6 Compare April 23, 2020 09:18
@mmailhos
Copy link
Contributor Author

Because Github Action does not support build-arg, I have moved the Go binary install (from initially Docker image) to entrypoint.sh.

Removed initial commit.

Made Go version required with default to 1.14.2.

@mmailhos mmailhos changed the title feat: specify your Go version feat: specify Go version Apr 23, 2020
@sue445 sue445 self-assigned this Apr 23, 2020
action.yml Outdated
go_version:
description: Specify your Go version
required: true
default: 1.14.2
Copy link
Owner

Choose a reason for hiding this comment

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

1.14.2 is the latest version at this time, but not latest version in future. I don't want to release action every time there is a new go version.

This is hard coding in another sense.

I prefer getting the latest version when performing an action. I think it's natural to use the latest version if go_version was omitted

This is a snippet to get the latest version of Go.

$ curl -s https://api.github.com/repos/golang/go/git/refs/tags | jq --raw-output '.[].ref | select(test("^refs/tags/go[0-9.]+$"))' | tail -n 1 | sed 's!refs/tags/go!!'
1.14.2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the command, it's much better

@mmailhos mmailhos force-pushed the feat/specify-go-version branch from ec01fb2 to 1d6a9ba Compare April 24, 2020 05:11
@sue445 sue445 merged commit 2c979ee into sue445:master Apr 24, 2020
@sue445
Copy link
Owner

sue445 commented Apr 24, 2020

LGTM!

@sue445
Copy link
Owner

sue445 commented Apr 24, 2020

I released as v1.4.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants