2023-07-09 03:43:52 +00:00
|
|
|
name: homelab-ci
|
|
|
|
|
2023-07-20 04:33:42 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- testing
|
2023-07-09 03:43:52 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
homelab-ci:
|
2024-05-02 03:16:08 +00:00
|
|
|
runs-on: macos-13
|
2023-07-09 03:43:52 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Cache Vagrant boxes
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: ~/.vagrant.d/boxes
|
|
|
|
key: ${{ runner.os }}-vagrant-${{ hashFiles('Vagrantfile') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-vagrant-
|
|
|
|
|
2024-05-02 03:16:08 +00:00
|
|
|
- name: Install VirtualBox
|
|
|
|
run: brew install --cask virtualbox
|
|
|
|
|
|
|
|
- name: Install Vagrant
|
|
|
|
run: brew install --cask vagrant
|
|
|
|
|
2023-07-09 03:43:52 +00:00
|
|
|
- name: Install Ansible
|
2024-05-02 03:16:08 +00:00
|
|
|
run: brew install ansible
|
2023-07-09 03:43:52 +00:00
|
|
|
|
|
|
|
- name: Software Versions
|
|
|
|
run: |
|
2024-05-02 03:16:08 +00:00
|
|
|
printf "VirtualBox "; vboxmanage --version
|
2023-07-09 03:43:52 +00:00
|
|
|
vagrant --version
|
|
|
|
ansible --version
|
|
|
|
|
|
|
|
- name: Vagrant Up with Dockerbox Playbook
|
|
|
|
run: |
|
|
|
|
PLAYBOOK=dockerbox vagrant up
|
|
|
|
vagrant ssh -c "docker ps"
|