Add pristine-ubuntu-action to hosted runners
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
Prevent GitHub-hosted runner updates from breaking workflows by cleaning up pre-installed bloat (15-20 GiB freed).
## Changes
- Added `lengau/pristine-ubuntu-action@v0` as first step in `setup-python-runner/action.yaml`
- Conditionally runs only on GitHub-hosted Linux runners: `runner.os == 'Linux' && runner.environment == 'github-hosted'`
- Self-hosted runners automatically skip this step
## Affected Workflows
Applies to all workflows using `setup-python-runner`:
- `test-python.yaml` (reusable workflow)
- `self-test-setup.yaml`
- Any downstream callers
```yaml
steps:
- name: Pristine Ubuntu
if: ${{ runner.os == 'Linux' && runner.environment == 'github-hosted' }}
uses: lengau/pristine-ubuntu-action@v0
- name: Start apt update
# ... rest of setup
```
> [!WARNING]
>
> <details>
> <summary>Firewall rules blocked me from connecting to one or more addresses (expand for details)</summary>
>
> #### I tried to connect to the following addresses, but was blocked by firewall rules:
>
> - `https://api.github.com/repos/lengau/pristine-ubuntu-action`
> - Triggering command: `/usr/bin/curl curl -s REDACTED` (http block)
> - `https://api.github.com/repos/lengau/pristine-ubuntu-action/tags`
> - Triggering command: `/usr/bin/curl curl -s REDACTED` (http block)
>
> If you need me to access, download, or install something from one of these locations, you can either:
>
> - Configure [Actions setup steps](https://gh.io/copilot/actions-setup-steps) to set up my environment, which run before the firewall is enabled
> - Add the appropriate URLs or hosts to the custom allowlist in this repository's [Copilot coding agent settings](https://github.com/canonical/starflow/settings/copilot/coding_agent) (admins only)
>
> </details>
<!-- START COPILOT ORIGINAL PROMPT -->
<details>
<summary>Original prompt</summary>
>
> ----
>
> *This section details on the original issue you should resolve*
>
> <issue_title>Use the pristine-ubuntu action on hosted runners</issue_title>
> <issue_description>### What needs to get done
>
> On hosted runners we should use a version of https://github.com/lengau/pristine-ubuntu-action/.
>
> ### Why it needs to get done
>
> Prevent updated runners from breaking us yet again. </issue_description>
>
> <agent_instructions>That action should be the first thing that's run on the github-hosted runners. It should not run on self-hosted runners at all.</agent_instructions>
>
> ## Comments on the Issue (you are @copilot in this section)
>
> <comments>
> </comments>
>
</details>
<!-- START COPILOT CODING AGENT SUFFIX -->
- Fixes canonical/starflow#100
<!-- START COPILOT CODING AGENT TIPS -->
---
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs.
Evaluation history
No evaluation history available.