This repository was archived by the owner on Nov 3, 2026. It is now read-only.
Repository navigation
Add the setup-vagrant-libvirt action - #1
Closed
michael-riddle wants to merge 1 commit into
Closed
michael-riddle wants to merge 1 commit into
michael-riddle wants to merge 1 commit into
Conversation
Install Vagrant, the vagrant-libvirt provider and libvirt on an Ubuntu GitHub Actions runner for Beaker acceptance tests, without failing the job when Launchpad is down. Ubuntu dropped vagrant and vagrant-libvirt after 23.10; ppa:evgeni/vagrant carries vagrant 2.3.7, the last MPL-licensed release, and a matching vagrant-libvirt. The action tries, in order: 1. The Actions cache: the PPA's packages, restored from the newest key for the runner's Ubuntu series and architecture, installed with no request to Launchpad. 2. The PPA, with each step retried three times, 30s and then 60s apart. Only the PPA's own index refresh uses --error-on=any, so a flaky third-party source on the runner image doesn't fail the job. 3. HashiCorp's apt repository, pinned to vagrant-version, with `vagrant plugin install vagrant-libvirt` pinned to vagrant-libvirt-version, and a warning that this is BSL-licensed Vagrant. On a series the PPA doesn't publish for (ppa-series), the action goes straight here with a notice. A pull request can only restore caches saved from its own ref, its base branch or the default branch, so `cache-only: 'true'` saves the packages from a default-branch workflow instead of installing. It caches every package the PPA would provide, unpinned, under a key derived from their file names: a new PPA build gets a new key, and restoring an existing key keeps it from being evicted. Downloads go through apt-get download, which checks them against the PPA's signed index. CI lints the action and runs it on real runners: cache-only on ubuntu-24.04 and ubuntu-latest, and installs from the cache, the PPA and HashiCorp, with Launchpad reachable and blocked. See simp/puppetsync#122. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Superseded by simp/gha-workflows#18: the action moved into simp/gha-workflows so there is one repo to manage. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Adds the
setup-vagrant-libvirtcomposite action for simp/puppetsync#122: install Vagrant, vagrant-libvirt and libvirt on an Ubuntu runner without failing the job when Launchpad is down.The pupmod acceptance jobs installed from
ppa:evgeni/vagrantalone. On 2026-10-21 Launchpad returned 503 for several hours, every acceptance job failed, and the requiredAll checksstatus blocked merging. simp/puppetsync#126 switches the pupmodpr_tests.ymltemplates to this action and adds avagrant_package_cache.ymlworkflow that warms its cache from each repo's default branch.Behavior
The action tries, in order:
add-apt-repository, a refresh of the PPA's index alone with--error-on=any, then the install. Each step is retried three times, 30s and then 60s apart. Otherapt-get updatecalls are plain, so a flaky third-party source on the runner image doesn't fail the job.vagrantpinned tovagrant-version(2.4.9-1), andvagrant plugin install vagrant-libvirtpinned tovagrant-libvirt-version(0.12.2), with a::warning::that this is BSL-licensed Vagrant. On a series the PPA doesn't publish for (ppa-series, defaultnoble), the action goes straight here with a::notice::.ubuntu-latestis moving to 26.04, which the PPA doesn't cover.When the PPA path fails, its sources file is deleted directly, because
add-apt-repository -rcan itself need Launchpad.cache-onlyA pull request can only restore caches saved from its own ref, its base branch or the default branch, so caches saved by pull requests don't help other PRs. With
cache-only: 'true', the action is meant for a default-branch workflow (push and schedule). It works as follows:apt-get install --print-uris vagrant vagrant-libvirtand keeps every package the PPA would provide, so a dependency the PPA ships is cached too.apt-get download, which checks them against the PPA's signed index, and saves them.Testing
shellcheckandactionlintpass. The cache path (resolve, download, then install with the PPA removed) was also run in anubuntu:24.04container.ubuntu-24.04andubuntu-latest, and five install cases covering the cache, the PPA and HashiCorp, with Launchpad reachable and blocked (via/etc/hosts).After merge
Tag
v1.0.0; simp/puppetsync#126 pins to it. The new repo has no branch protection yet;All checksis the check to require.🤖 Generated with Claude Code