Skip to content

Commit

Permalink
Test Caching
Browse files Browse the repository at this point in the history
  • Loading branch information
steelhead31 committed Mar 8, 2024
1 parent 5779329 commit 8a5cdc7
Showing 1 changed file with 28 additions and 17 deletions.
45 changes: 28 additions & 17 deletions .github/workflows/build_vagrant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,35 @@ jobs:
run: |
wget https://ci.adoptium.net/userContent/vagrant/Solaris10.box.gz
- name: Verify Checksum & Add Solaris 10 Box To Vagrant
- name: Save Solaris 10 Box If Cache Misses
if: steps.solaris-10-cache.outputs.cache-hit != 'true'
id: solaris-10-cache
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
with:
path: Solaris10.box.gz
key: sol10box

- name: Verify Checksum & Add Solaris 10 Box To Vagrant If Cache Misses
if: steps.solaris-10-cache.outputs.cache-hit != 'true'
run: |
CKSUM=`shasum -a 256 ./Solaris10.box.gz|cut -d" " -f1`
if [ "$CKSUM" = "0879215f4bf03f5e125addb139d0b5a49a4f8a258297b765cf1f22a8a7ee3309" ]
then
echo "Checksum OK"
gunzip Solaris10.box.gz
vagrant box add --name="solaris10" ./Solaris10.box
rm Solaris10.box
else
echo "Sum Bad"
exit 99;
fi
fi
- name: Solaris 10 Box To Vagrant From Cache
if: steps.solaris-10-cache.outputs.cache-hit == 'true'
run: |
echo "1"
pwd
echo "2"
ls -ltr
# CKSUM=`shasum -a 256 ./Solaris10.box.gz|cut -d" " -f1`
# if [ "$CKSUM" = "0879215f4bf03f5e125addb139d0b5a49a4f8a258297b765cf1f22a8a7ee3309" ]
# then
# echo "Checksum OK"
# gunzip Solaris10.box.gz
# vagrant box add --name="solaris10" ./Solaris10.box
# rm Solaris10.box
# else
# echo "Sum Bad"
# exit 99;
# fi
# fi
vagrant box add --name="solaris10" ./Solaris10.box
rm Solaris10.box
# - name: Setup Vagrant VM
# run: |
Expand Down

0 comments on commit 8a5cdc7

Please sign in to comment.