Skip to content

Vagrant Up

Vagrant Up #221

Workflow file for this run

name: Vagrant Up
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
contents: read
jobs:
vagrant-up:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- run: brew install vagrant
- name: install virtual box 7.0.20
run: |
curl -LO https://download.virtualbox.org/virtualbox/7.0.20/VirtualBox-7.0.20-163906-OSX.dmg
hdiutil mount VirtualBox-7.0.20-163906-OSX.dmg
sudo installer -pkg /Volumes/VirtualBox/VirtualBox.pkg -target /
hdiutil unmount /Volumes/VirtualBox
# Installing this is skipped in CI as using it was causing some corruption in
# attempting to mount the shared folder. The guest and host guest additions
# versions are close enough that we are fine without it.
# - run: vagrant plugin install vagrant-vbguest
- run: NO_SUBMISSIONS=1 vagrant up ubuntu-22.04
- name: Validate image
run: curl --show-error --fail --include http://localhost:1511
- name: Acquire Job ID
if: failure()
id: get-job-id
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
jobs=$(gh api repos/${{ github.repository }}/actions/runs/${{ github.run_id}}/attempts/${{ github.run_attempt }}/jobs)
job_id=$(echo $jobs | jq -r '.jobs[] | select(.runner_name=="${{ runner.name }}") | .id')
echo "job_id=$job_id" >> $GITHUB_OUTPUT
- name: Send zulip message on failure
if: failure()
run: |
curl -X POST https://submitty.zulipchat.com/api/v1/messages -u ${{ secrets.ZULIP_AUTHENTICATION }} --data-urlencode 'type=stream' --data-urlencode 'to=Submitty Developer Studio' --data-urlencode 'topic=Vagrant Up Failures' --data-urlencode 'content=The Vagrant Up Github Action has failed. View here: https://github.com/Submitty/Submitty/actions/runs/${{ github.run_id }}/job/${{ steps.get-job-id.outputs.job_id }}'