Skip to content

Commit

Permalink
Update to vbox 7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
philnewm committed Sep 22, 2024
1 parent c2286e5 commit c682b16
Showing 1 changed file with 97 additions and 76 deletions.
173 changes: 97 additions & 76 deletions .github/workflows/alma9-vbox-ci.yml
Original file line number Diff line number Diff line change
@@ -1,83 +1,104 @@
---

name: alma9-vbox-ci

on:
push:
branches: [ "main" ]
paths-ignore:
name: alma9-vbox-ci

on:
push:
branches: [ "main" ]
paths-ignore:
- 'README.md'
- 'TODO.md'
- '**/*.md'
- .gitignore

pull_request:
branches: [ "main" ]
paths-ignore:
- 'README.md'
- 'TODO.md'
- '**/*.md'
- .gitignore

pull_request:
branches: [ "main" ]
paths-ignore:
- 'README.md'
- '**/*.md'
- .gitignore

permissions:
contents: read

jobs:
alma9-vbox:
runs-on: ubuntu-latest
strategy:
max-parallel: 5

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Update system
run: |
sudo apt-get update -y
- name: Install VirtualBox 7.0.14
run: |
wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --dearmor --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
sudo apt-get update
wget https://download.virtualbox.org/virtualbox/7.0.14/virtualbox-7.0_7.0.14-161095~Ubuntu~$(lsb_release -cs)_amd64.deb
sudo apt-get install -y linux-headers-$(uname -r) dkms
sudo apt-get install ./virtualbox-7.0_7.0.14-161095~Ubuntu~$(lsb_release -cs)_amd64.deb
- name: Verify VirtualBox installation
run: VBoxManage --version

- name: Install vagrant
run: |
# Get vagrant gpg key
wget -O- 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 apt-get update && sudo apt-get install vagrant -y
- name: Verify Vagrant installation
run: vagrant --version

- name: Setup Packer
uses: hashicorp/[email protected]
id: setup

- name: Verify packer installation
run: packer --version

- name: Run packer build
run: |
packer init versions.pkr.hcl
packer build -only=virtualbox-iso.almalinux-9 .
- name: Test to run vagrant box
run: |
vagrant box add --name alma9 AlmaLinux-9-Vagrant-virtualbox-9.4.x86_64.box
vagrant init alma9
vagrant up
- name: Show running box
run: |
vagrant box list
vagrant global-status

env:
build_source_name: almalinux-9
box_name: almalinux9
box_file: AlmaLinux-9.4-Vagrant-virtualbox.x86_64.box

permissions:
contents: read

jobs:
alma9-vbox:
runs-on: ubuntu-latest
strategy:
max-parallel: 5

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Update system
run: |
sudo apt-get update -y
- name: Install VirtualBox 7.1.0
run: |
wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --dearmor --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
sudo apt-get update
wget https://download.virtualbox.org/virtualbox/7.1.0/virtualbox-7.0_7.1.0-164728~Ubuntu~$(lsb_release -cs)_amd64.deb
sudo apt-get install -y linux-headers-$(uname -r) dkms build-essential
sudo apt-get install ./virtualbox-7.0_7.1.0-161095~Ubuntu~$(lsb_release -cs)_amd64.deb
- name: Verify VirtualBox installation
run: VBoxManage --version

- name: Show vbox log
run: |
cat /var/log/vbox-setup.log
- name: Install vagrant
run: |
# Get vagrant gpg key
wget -O- 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 apt-get update && sudo apt-get install vagrant -y
- name: Verify Vagrant installation
run: vagrant --version

- name: Setup Packer
uses: hashicorp/[email protected]
id: setup

- name: Verify packer installation
run: packer --version

- name: Run packer build
run: |
packer init versions.pkr.hcl
packer build -only=virtualbox-iso.almalinux-9 .
- name: Test to run vagrant box
run: |
vagrant box add --name ${{ env.box_name }} ${{ env.box_file }}
vagrant init ${{ env.box_name }}
vagrant up
- name: Show running box
run: |
vagrant box list
vagrant global-status
- name: Upload vagrant box file
uses: actions/upload-artifact@v4
with:
name: "${{ env.box_name }}-vagrant-box"
path: |
${{ env.box_file }}
...

0 comments on commit c682b16

Please sign in to comment.