-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (59 loc) · 1.78 KB
/
main.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
56
57
58
59
name: "Update and build packages, and populate cache"
on:
pull_request:
push:
schedule:
- cron: '50 6 * * *'
- cron: '51 12 * * *'
- cron: '52 18 * * *'
- cron: '53 23 * * *'
- cron: '15 0 * * *'
jobs:
build:
environment:
name: cachix
strategy:
matrix:
nurRepo:
- ivar
cachixName:
- ivar
nixPath:
- nixpkgs=channel:nixpkgs-unstable
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Update repository
run: git pull -f
- name: Install nix
uses: cachix/install-nix-action@v13
with:
nix_path: "${{ matrix.nixPath }}"
- name: Show nixpkgs version
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
- name: Setup cachix
uses: cachix/cachix-action@v10
if: ${{ matrix.cachixName != '<YOUR_CACHIX_NAME>' }}
with:
name: ${{ matrix.cachixName }}
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- name: Update packages
run: |
cd ryujinx
echo Now attempting to update Ryujinx
./updater.sh
cd ../yuzu
echo Now attempting to update yuzu
./updater.sh
- name: Build nix packages
run: nix run --quiet -I 'nixpkgs=channel:nixpkgs-unstable' nixpkgs.nix-build-uncached -c nix-build-uncached ci.nix -A cacheOutputs
- name: Push changes
uses: actions-x/commit@v2
with:
name: gh-actions
message: Update packages to their latest version
files: ryujinx/default.nix ryujinx/deps.nix yuzu/default.nix
- name: Trigger NUR update
if: ${{ matrix.nurRepo != '<YOUR_REPO_NAME>' }}
run: curl -XPOST "https://nur-update.herokuapp.com/update?repo=${{ matrix.nurRepo }}"