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

support: Setting actions go version #640

Open
3 tasks done
c4dr01d opened this issue Oct 23, 2023 · 1 comment
Open
3 tasks done

support: Setting actions go version #640

c4dr01d opened this issue Oct 23, 2023 · 1 comment
Assignees
Labels
support User support

Comments

@c4dr01d
Copy link

c4dr01d commented Oct 23, 2023

Checklist

  • I am using the latest version of this action.
  • I have read the latest README and followed the instructions.
  • I have read the latest GitHub Actions official documentation and learned the basic spec and concepts.

Describe your question

Hi, I'm deploy my hugo blog with hugo modules, when I write the actions and push to repository, the build log report the go version is mismatched, detail in the log out section. I want to set go version to 1.23, have any option can let it work?

Relevant links

Public repository: [My project repository](https://github.com/c4dr01d/c4dr01d.github.io)
YAML config: [The yaml config](https://github.com/c4dr01d/c4dr01d.github.io/blob/master/.github/workflows/main.yml)
YAML workflow: [Build](https://github.com/c4dr01d/c4dr01d.github.io/blob/master/.github/workflows/main.yml#L37)

Relevant log output

Run hugo --minify
  hugo --minify
  shell: /usr/bin/bash -e {0}
go: errors parsing go.mod:
Total in 50 ms
Error: failed to load modules: failed to download modules: failed to execute 'go [mod download -modcacherw]': failed to execute binary "go" with args [mod download -modcacherw]: go: errors parsing go.mod:
/home/runner/work/c4dr01d.github.io/c4dr01d.github.io/go.mod:3: invalid go version '1.[2](https://github.com/c4dr01d/c4dr01d.github.io/actions/runs/6610778012/job/17953372400#step:6:2)1.[3](https://github.com/c4dr01d/c4dr01d.github.io/actions/runs/6610778012/job/17953372400#step:6:3)': must match format 1.23
 *errors.errorString
/home/runner/work/c[4](https://github.com/c4dr01d/c4dr01d.github.io/actions/runs/6610778012/job/17953372400#step:6:5)dr01d.github.io/c4dr01d.github.io/go.mod:3: invalid go version '1.21.3': must match format 1.23
Error: Process completed with exit code 1.

Additional context.

No any other context about this question

@c4dr01d c4dr01d added the support User support label Oct 23, 2023
@128keaton
Copy link

128keaton commented Oct 25, 2023

Having the same issue. macOS doesn't have a built binary for 1.23, just 1.21. As a workaround, I added this build step:

      - name: Swap Go Version
        run: sed -i -e 's/1.21.1/1.23/g' go.mod

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

No branches or pull requests

3 participants