Use project Go version for generating website content #167
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The project documentation is published on a companion website. A GitHub Actions workflow is used to automatically update the website whenever any relevant file is changed in the repository. This website includes content generated from the project's Go code.
Previously, the default version of Go from the GitHub Actions runner machine was used for generating the documentation content. A recent update of this default Go version from 1.17 to 1.20 (actions/runner-images#7276) caused the generation process to fail:
https://github.com/arduino/arduino-fwuploader/actions/runs/4923760846/jobs/8795964719#step:4:39
The "Deploy Website" workflow runs would fail with the same error, but a run hasn't been triggered since the change to the GitHub Actions runner machine (due to lack of activity in the repo). You can see a demonstration of the failure in a workflow run I triggered in my fork:
https://github.com/per1234/arduino-fwuploader/actions/runs/4955614245/jobs/8865167570#step:6:48
This error, and the general fragility that comes from the lack of control over the Go version, is avoided by configuring the workflow to use the specific version of Go that is used for development and validation of the project.
Demonstration in my fork of a successful run of the updated "Deploy Website" workflow:
https://github.com/per1234/arduino-fwuploader/actions/runs/4955616902/jobs/8865172681#step:7:49
Demonstration run of the updated "Check Markdown" workflow:
https://github.com/arduino/arduino-fwuploader/actions/runs/4955646801/jobs/8865232351?pr=167#step:5:1