-
Notifications
You must be signed in to change notification settings - Fork 200
55 lines (54 loc) · 1.92 KB
/
keep_releases_in_cachix.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
45
46
47
48
49
50
51
52
53
54
55
name: Keep Releases in Cachix
on:
push:
branches: master
schedule:
- cron: '0 17 * * *'
jobs:
build:
strategy:
matrix:
version: ["v1.3.0", "v1.2.0", "v1.1.0", "v1.0.1", "v1.0.0"]
os: [ubuntu-latest, macos-latest, ARM64]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/d899609c2a22bbd345d2ed200c6ebc08a772ccc9.tar.gz
if: matrix.os != 'ARM64'
- uses: cachix/cachix-action@v14
with:
name: digitallyinduced
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
if: matrix.os != 'ARM64'
- run: git clone https://github.com/digitallyinduced/ihp-boilerplate.git
- run: |
cd ihp-boilerplate
git checkout ${{ matrix.version }}
if test -f flake.nix; then \
nix develop --impure --command bash -c "new-application Web && make build/bin/RunUnoptimizedProdServer"; \
else \
nix-shell --run "new-application Web && make build/bin/RunUnoptimizedProdServer"; \
fi;
- name: Build IHP app
run: |
cd ihp-boilerplate
if test -f flake.nix; then \
nix develop --impure --profile ihp-boilerplate-profile --command "true"; \
else \
nix-shell --run "true"; \
fi;
- name: Install jq
run: nix profile install nixpkgs#jq
if: matrix.os != 'ARM64'
- name: Push IHP app to cachix
run: |
cd ihp-boilerplate
if test -f flake.nix; then \
cachix push digitallyinduced ihp-boilerplate-profile; \
nix develop --impure --command bash -c 'make -s all; new-application Web'; \
git add .; \
nix build --json --impure | jq -r '.[].outputs | to_entries[].value' | cachix push digitallyinduced; \
fi;