Skip to content

Commit

Permalink
Cache Debian image for Vagrant to speed up the build
Browse files Browse the repository at this point in the history
Signed-off-by: Benoit Donneaux <[email protected]>
  • Loading branch information
btlogy committed Sep 17, 2024
1 parent 70feab3 commit fdf1cfb
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/_ansible_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,26 @@ jobs:
END_OF_KEY
DEPLOYMENT_TARGET=${{ inputs.deployment_target }}
EOF
mkdir -p .vagrant/images
- name: Start Vagrant boxe(s)
- name: Cache Vagrant
id: vagrant_cache
uses: actions/cache@v4
with:
path: .vagrant/images
key: ${{ runner.os }}-Vagrant-${{ hashFiles('.vagrant/images/*') }}

- name: Download Vagrant image
id: vagrant_image
run: |
pushd .vagrant/images
wget "https://vagrantcloud.com/debian/boxes/bookworm64/versions/12.20240905.1/providers/libvirt/unknown/vagrant.box"
sudo ln -s $(pwd)/vagrant.box \
/var/lib/libvirt/images/debian-VAGRANTSLASH-bookworm64_vagrant_box_image_12.20240905.1_box.img
popd
sudo ls -lA /var/lib/libvirt/images
- name: Start Vagrant
id: vagrant_start
run: |
# Start the Vagrant guest(s)
Expand All @@ -122,7 +140,7 @@ jobs:
echo -n "${target_rev}" | \
ssh -T -F ssh.conf "${DEPLOYMENT_USER}@${DEPLOYMENT_TARGET}"
- name: Stop Vagrant boxe(s)
- name: Stop Vagrant
id: vagrant_stop
run: |
# Stop the Vagrant guest(s)
Expand Down

0 comments on commit fdf1cfb

Please sign in to comment.