-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (35 loc) · 1.15 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: build template
on:
push:
branches:
- 'master'
- '152-build-on-github-actions'
workflow_dispatch:
env:
VAGRANT_CLOUD_TOKEN: ${{ secrets.VAGRANT_CLOUD_TOKEN }}
GITHUB_KEY: ${{ secrets.GITHUB_KEY }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: install vagrant and virtualbox
run: |
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 update && sudo apt install vagrant virtualbox
- name: print versions and install plugin
run: |
vagrant --version
vboxmanage --version
vagrant plugin install vagrant-disksize
- name: authenticate with vagrant cloud
run: |
vagrant cloud auth login --token $VAGRANT_CLOUD_TOKEN
- name: vagrant up
run: |
vagrant up
- name: vagrant halt
run: |
vagrant halt