mirror of
https://github.com/techno-tim/k3s-ansible.git
synced 2025-12-28 19:52:40 +01:00
fix(ci): adjusting cache steps
This commit is contained in:
24
.github/add-boxes.sh
vendored
Executable file
24
.github/add-boxes.sh
vendored
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# add-boxes.sh
|
||||||
|
# list add boxes on system and add
|
||||||
|
# already present on the system.
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
PROVIDER=virtualbox
|
||||||
|
|
||||||
|
# Read the boxes that are currently present on the system (for the current provider)
|
||||||
|
present_boxes=$(
|
||||||
|
(vagrant box list |
|
||||||
|
grep "${PROVIDER}" | # Filter by boxes available for the current provider
|
||||||
|
awk '{print $1;}' | # The box name is the first word in each line
|
||||||
|
sort |
|
||||||
|
uniq) ||
|
||||||
|
echo "" # In case any of these commands fails, just use an empty list
|
||||||
|
)
|
||||||
|
|
||||||
|
# Add all boxes
|
||||||
|
echo "${present_boxes}" | while IFS= read -r box; do
|
||||||
|
vagrant box add --provider "${PROVIDER}" "${box}"
|
||||||
|
done
|
||||||
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -58,7 +58,7 @@ jobs:
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
- name: Add Vagrant Boxes
|
- name: Add Vagrant Boxes
|
||||||
run: ./.github/download-boxes.sh
|
run: ./.github/add-boxes.sh
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user