-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (52 loc) · 1.63 KB
/
fenrir.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: fenrir
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
# This job checks if an identical workflow is being triggered by different
# event and skips it. For instance there is no need to run the same pipeline
# twice for pull_request and push for identical commit sha.
pre_job:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
build: ${{ steps.filter.outputs.build }}
steps:
- uses: actions/checkout@v3
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5.3.0
with:
skip_after_successful_duplicate: 'true'
concurrent_skipping: same_content
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
build:
- "hosts/fenrir/**"
- ".github/workflows/fenrir.yml"
- "modules/**"
- "pkgs/**"
- "flake.nix"
- "flake.lock"
nix-build:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.build == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: cachix/install-nix-action@v22
- uses: actions/checkout@v3
- name: Setup Cachix ❄️
uses: cachix/cachix-action@v12
with:
name: rszamszur-nixos
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build fenrir
env:
RCU_PRODUCT_KEY: ${{ secrets.RCU_PRODUCT_KEY }}
run: nix build .#nixosConfigurations.fenrir.config.system.build.toplevel -L