-
-
Notifications
You must be signed in to change notification settings - Fork 103
36 lines (31 loc) · 1006 Bytes
/
release.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
name: Release CI
on:
push:
branches: [ "nixos-**" ]
jobs:
build:
name: Run build ${{ matrix.BUILDER }} ${{ matrix.ARCH }}
runs-on: macos-12
strategy:
matrix:
BUILDER: ['virtualbox-iso.virtualbox', 'qemu.qemu']
ARCH: ['x86_64']
steps:
- uses: actions/checkout@v3
- name: Create Vagrant Cloud Box
run: |
curl \
--request POST \
--header "Content-Type: application/json" \
--header "Authorization: Bearer $ATLAS_TOKEN" \
https://app.vagrantup.com/api/v2/boxes \
--data '{ "box": { "username": "nixbox", "name": "nixos" } }'
- name: Setup `packer`
uses: hashicorp/setup-packer@main
id: setup
with:
version: "latest"
- name: Run build ${{ matrix.BUILDER }} ${{ matrix.ARCH }} and push box to vagrant cloud
env:
ATLAS_TOKEN: ${{ secrets.ATLAS_TOKEN }}
run: make VERSION=${GITHUB_REF#refs/heads/nixos-} BUILDER=${{ matrix.BUILDER }} packer-build