Update CI and docs workflows to use stable action releases - #132
Conversation
Agent-Logs-Url: https://github.com/openghg/ogcat/sessions/6376f75a-e249-4431-9c0d-8c2d9edb9765 Co-authored-by: brendan-m-murphy <11130776+brendan-m-murphy@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes the Docs GitHub Actions workflow by pinning the astral-sh/setup-uv action to a stable immutable release tag so the Build docs job can reliably install uv again.
Changes:
- Update
.github/workflows/docs.ymlfromastral-sh/setup-uv@v5toastral-sh/setup-uv@v8.1.0.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Set up uv | ||
| uses: astral-sh/setup-uv@v5 | ||
| uses: astral-sh/setup-uv@v8.1.0 | ||
| with: | ||
| enable-cache: true |
|
@copilot implement the review suggestion to update ci.yml as well. Note that CI is failing, now due to a different action. Please fix that too. |
Agent-Logs-Url: https://github.com/openghg/ogcat/sessions/ef453ad9-1f7b-483e-9095-808bffcc23a7 Co-authored-by: brendan-m-murphy <11130776+brendan-m-murphy@users.noreply.github.com>
Implemented in 8421134. I updated |
The workflows were failing before the Python and docs steps started because GitHub Actions could no longer download the archives resolved from outdated action references. This updates the affected workflows to current stable releases so CI can install
uvreliably again and Docs can upload the built Pages artifact.Workflow fixes
astral-sh/setup-uv@v5reference in.github/workflows/docs.ymlwith the stable releasev8.1.0.astral-sh/setup-uv@v5reference in.github/workflows/ci.ymlwith the stable releasev8.1.0.actions/upload-pages-artifact@v3in.github/workflows/docs.ymlwithv5.0.0.Why this change
Updated workflow steps
Original prompt
Update the GitHub Actions docs workflow in
openghg/ogcatto use the latest stableastral-sh/setup-uvaction instead of the current floating@v5reference, which is currently failing to download in theBuild docsjob for workflow run26447464981.Context:
openghg/ogcat.github/workflows/docs.ymluses: astral-sh/setup-uv@v5Build docsjob of theDocsworkflow.astral-sh/setup-uv.Requested change:
astral-sh/setup-uv.Please:
astral-sh/setup-uv..github/workflows/docs.ymlaccordingly.The following is the prior conversation context from the user's chat exploration (may be truncated):
User: Why is "Build docs" failing? It worked yesterday, but today there is some error about failing to download an action for setup-uv
Assistant:
Build docsis failing before your workflow code even starts: GitHub Actions cannot downloadastral-sh/setup-uv@v5.The failing line is in
.github/workflows/docs.yml:And the job log shows the exact failure:
So the answer is: the referenced action revision is no longer downloadable. This is not a docs build error, Python error, or
uv syncerror — the runner never gets that far.Most likely causes:
setup-uv@v5was recently retagged or changed upstream.codeload.Why it worked yesterday:
@v5resolves externally.@v5to SHAd4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86, and that archive could not be fetched.Recommended fix:
setup-uvto a known-good full commit SHA instead of@v5.uvdirectly in a shell step.If you want, I can also check the
astral-sh/setup-uvtags/releases and tell you exactly what to pin it to.User: yes check setup-uv for tags/releases so I know where to pin
Assistant: Pin to a specific immutable release tag, not the floating major tag
@v5.What I found:
astral-sh/setup-uvreleases page shows newer releases like v7.1.6 and indicates usage likeuses: astral-sh/setup-uv@v7. (github.com)setup-uvexplicitly says v8.0.0 is the first immutable release and recommends using the immutable tag formastral-sh/setup-uv@v8.0.0. (newreleases.io)So my recommendation is:
That is better than
@v5because:@v5is a floating major tag, so it can change underneath you. (github.com)@v8.0.0is much less likely to break due to retagging or a missing underlying commit. (newreleases.io)One caveat:
v5straight tov8.0.0may include breaking changes. The releases page notes that v7.0.0 included a breaking change from switching to Node 24 for the action runtime. On GitHub-hosted runners that should generally be fine, but it’s still a version jump. (github.com)Practical safest path:
This pull request was created from Copilot chat.