-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
198 changed files
with
7,029 additions
and
3,757 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: 'Setup golang with master only caching' | ||
description: 'A composite action that installs golang, but with a caching strategy that only updates the cache on master branch.' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: 'go.mod' # Just use whatever version is in the go.mod file | ||
cache: ${{ github.ref == 'refs/heads/master' }} | ||
|
||
- name: Prepare for go cache | ||
if: ${{ github.ref != 'refs/heads/master' }} | ||
shell: bash | ||
run: | | ||
echo "GO_CACHE=$(go env GOCACHE)" | tee -a "$GITHUB_ENV" | ||
echo "GO_MODCACHE=$(go env GOMODCACHE)" | tee -a "$GITHUB_ENV" | ||
echo "GO_VERSION=$(go env GOVERSION | tr -d 'go')" | tee -a "$GITHUB_ENV" | ||
- name: Setup read-only cache | ||
if: ${{ github.ref != 'refs/heads/master' }} | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
${{ env.GO_MODCACHE }} | ||
${{ env.GO_CACHE }} | ||
# Match the cache key to the setup-go action https://github.com/actions/setup-go/blob/main/src/cache-restore.ts#L34 | ||
key: setup-go-${{ runner.os }}-${{ env.ImageOS }}-go-${{ env.GO_VERSION }}-${{ hashFiles('go.sum') }} | ||
restore-keys: | | ||
setup-go-${{ runner.os }}- |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: 'Setup Vagrant and Libvirt' | ||
description: 'A composite action that installs latest versions of vagrant and libvirt for use on ubuntu based runners' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Add vagrant to apt-get sources | ||
shell: bash | ||
run: | | ||
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg | ||
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list | ||
sudo sed -i 's/^# deb-src/deb-src/' /etc/apt/sources.list | ||
- name: Install vagrant and libvirt | ||
shell: bash | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libvirt-daemon libvirt-daemon-system vagrant | ||
sudo systemctl enable --now libvirtd | ||
- name: Build vagrant dependencies | ||
shell: bash | ||
run: | | ||
sudo apt-get build-dep -y vagrant ruby-libvirt | ||
sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libvirt-dev ruby-bundler ruby-dev zlib1g-dev | ||
# This is a workaround for the libvirt group not being available in the current shell | ||
# https://github.com/actions/runner-images/issues/7670#issuecomment-1900711711 | ||
- name: Make the libvirt socket rw accessible to everyone | ||
shell: bash | ||
run: | | ||
sudo chmod a+rw /var/run/libvirt/libvirt-sock | ||
|
||
- name: Install vagrant-libvirt plugin | ||
shell: bash | ||
run: vagrant plugin install vagrant-libvirt |
This file was deleted.
Oops, something went wrong.
This file contains 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
Oops, something went wrong.