forked from flakestry/flakestry.dev
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (33 loc) · 872 Bytes
/
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
name: "Test"
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
inputs:
env:
description: "Staging or production"
type: "string"
required: true
jobs:
tests:
strategy:
matrix:
os: [ubuntu-latest] #macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v23
- uses: cachix/cachix-action@v12
with:
name: devenv
- name: Install devenv.sh
run: nix profile install tarball+https://install.devenv.sh/latest
shell: sh
- run: devenv test
- name: Deploy staging
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.os == 'ubuntu-latest'
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
run: devenv shell deploy-${{ inputs.env || 'staging' }}