Skip to content

Update CI and docs workflows to use stable action releases - #132

Merged
brendan-m-murphy merged 3 commits into
mainfrom
copilot/update-setup-uv-action
May 26, 2026
Merged

brendan-m-murphy merged 3 commits into
mainfrom
copilot/update-setup-uv-action

Conversation

Copilot AI commented May 26, 2026

Copy link
Copy Markdown
Contributor

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 uv reliably again and Docs can upload the built Pages artifact.

  • Workflow fixes

    • Replace the floating astral-sh/setup-uv@v5 reference in .github/workflows/docs.yml with the stable release v8.1.0.
    • Replace the floating astral-sh/setup-uv@v5 reference in .github/workflows/ci.yml with the stable release v8.1.0.
    • Replace actions/upload-pages-artifact@v3 in .github/workflows/docs.yml with v5.0.0.
    • Leave the rest of the CI and docs jobs unchanged, including Python version, cache behavior, dependency install, test, type-check, and Sphinx build steps.
  • Why this change

    • The failures were in action download resolution, not in the project commands themselves.
    • Using current stable releases avoids depending on outdated references that can resolve to unavailable archives.
  • Updated workflow steps

    - name: Set up uv
      uses: astral-sh/setup-uv@v8.1.0
      with:
        enable-cache: true
    - name: Upload Pages artifact
      uses: actions/upload-pages-artifact@v5.0.0
      with:
        path: docs/_build/html
Original prompt

Update the GitHub Actions docs workflow in openghg/ogcat to use the latest stable astral-sh/setup-uv action instead of the current floating @v5 reference, which is currently failing to download in the Build docs job for workflow run 26447464981.

Context:

  • Repository: openghg/ogcat
  • Workflow file: .github/workflows/docs.yml
  • Current step:
    • uses: astral-sh/setup-uv@v5
  • Failure observed in the Build docs job of the Docs workflow.
  • The failure occurs before the docs build starts, while GitHub Actions is downloading the action archive for astral-sh/setup-uv.

Requested change:

  • Update the workflow to use the latest available stable version of astral-sh/setup-uv.
  • Do not pin to an older major version.
  • Keep the existing workflow behavior unchanged other than updating the action reference as needed.

Please:

  1. Determine the latest appropriate stable version of astral-sh/setup-uv.
  2. Update .github/workflows/docs.yml accordingly.
  3. Open a pull request with a concise title and description explaining the workflow fix and why it was needed.

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 docs is failing before your workflow code even starts: GitHub Actions cannot download astral-sh/setup-uv@v5.

The failing line is in .github/workflows/docs.yml:

- name: Set up uv
  uses: astral-sh/setup-uv@v5
  with:
    enable-cache: true

And the job log shows the exact failure:

Download action repository 'astral-sh/setup-uv@v5' (SHA:d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86)
##[error]An action could not be found at the URI 'https://codeload.github.com/astral-sh/setup-uv/tar.gz/d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86'
##[error]Failed to download archive 'https://codeload.github.com/astral-sh/setup-uv/tar.gz/d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86' after 1 attempts.

So the answer is: the referenced action revision is no longer downloadable. This is not a docs build error, Python error, or uv sync error — the runner never gets that far.

Most likely causes:

  • setup-uv@v5 was recently retagged or changed upstream.
  • The specific commit GitHub resolved for that tag is no longer available from codeload.
  • Less likely: a transient GitHub/codeload outage, but this looks more like an upstream action reference problem than your repo changing.

Why it worked yesterday:

  • Your workflow file probably did not change, but the floating tag @v5 resolves externally.
  • On May 26, 2026, the run resolved @v5 to SHA d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86, and that archive could not be fetched.

Recommended fix:

  1. Pin setup-uv to a known-good full commit SHA instead of @v5.
  2. If you want a quick test, try changing it to a specific release tag that is known to exist, or temporarily switch to installing uv directly in a shell step.
  3. Re-run the workflow after updating that line.

If you want, I can also check the astral-sh/setup-uv tags/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:

  • The current astral-sh/setup-uv releases page shows newer releases like v7.1.6 and indicates usage like uses: astral-sh/setup-uv@v7. (github.com)
  • A release aggregator for setup-uv explicitly says v8.0.0 is the first immutable release and recommends using the immutable tag form astral-sh/setup-uv@v8.0.0. (newreleases.io)

So my recommendation is:

- name: Set up uv
  uses: astral-sh/setup-uv@v8.0.0
  with:
    enable-cache: true

That is better than @v5 because:

  • @v5 is a floating major tag, so it can change underneath you. (github.com)
  • An immutable full release tag like @v8.0.0 is much less likely to break due to retagging or a missing underlying commit. (newreleases.io)

One caveat:

  • Moving from v5 straight to v8.0.0 may 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:

  1. ...

This pull request was created from Copilot chat.

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>
Copilot AI changed the title [WIP] Update GitHub Actions to use latest stable version of astral-sh/setup-uv Update docs workflow to use stable setup-uv release May 26, 2026
@brendan-m-murphy
brendan-m-murphy marked this pull request as ready for review May 26, 2026 12:43
Copilot AI review requested due to automatic review settings May 26, 2026 12:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.yml from astral-sh/setup-uv@v5 to astral-sh/setup-uv@v8.1.0.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 30 to 33
- name: Set up uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v8.1.0
with:
enable-cache: true
@brendan-m-murphy

Copy link
Copy Markdown
Contributor

@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>

Copilot AI commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

@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.

Implemented in 8421134. I updated .github/workflows/ci.yml to use astral-sh/setup-uv@v8.1.0 and .github/workflows/docs.yml to use actions/upload-pages-artifact@v5.0.0. Local repo checks (uv sync --extra dev, ruff format --check, ruff check, pytest, pyright) all passed. The new GitHub Actions runs are now in action_required with no jobs created, which looks like a repository-side approval/policy gate rather than another workflow download failure.

Copilot AI changed the title Update docs workflow to use stable setup-uv release Update CI and docs workflows to use stable action releases May 26, 2026
@brendan-m-murphy
brendan-m-murphy merged commit 7eef31a into main May 26, 2026
3 checks passed
@brendan-m-murphy
brendan-m-murphy deleted the copilot/update-setup-uv-action branch May 26, 2026 14:00
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.

3 participants