-
Notifications
You must be signed in to change notification settings - Fork 5
59 lines (57 loc) · 1.46 KB
/
test.yaml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Build
on:
pull_request:
push:
tags:
- '*'
branches:
- master
jobs:
build:
name: CI
runs-on: ubuntu-latest
steps:
- name: Clone project
uses: actions/checkout@v2
- uses: extractions/setup-just@v1
with:
just-version: 1.8.0
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Build images (Nix)
shell: bash
run: |
set -exuo pipefail
just build-nix-image
just load-nix-image
just build-image
- name: Test image (Nix)
shell: bash
run: just test-image
- name: Build images (GHC official)
shell: bash
run: |
set -exuo pipefail
just build-ghc-image
- name: Test image (GHC official)
shell: bash
run: just test-ghc-image
- name: Push image
if: startsWith(github.ref, 'refs/tags/')
shell: bash
run: |
set -exuo pipefail
just push-image
just push-ghc-image
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
generate_release_notes: true