-
Notifications
You must be signed in to change notification settings - Fork 12
55 lines (44 loc) · 1.31 KB
/
update.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
name: Update
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * SUN' # every sunday
jobs:
update:
name: Pull in latest lib from Nixpkgs
runs-on: ubuntu-latest
steps:
- name: Procure Nix
uses: cachix/install-nix-action@v21
- name: Checkout
uses: actions/checkout@v2
with:
ref: master
path: nixpkgs-lib
- name: Checkout nixpkgs repo
uses: actions/checkout@v2
with:
ref: master
repository: NixOS/nixpkgs
path: nixpkgs
fetch-depth: 0 # complete history
- name: Procure git-filter-repo from nixpkgs
run: "nix profile install nixpkgs#git-filter-repo"
- name: Filter nixpkgs on ./lib
run: |
cd ./nixpkgs
git filter-repo --path lib --force
- name: Update nixpkgs.lib
run: |
cd ./nixpkgs-lib
git remote add other ../nixpkgs/
git fetch other master
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git merge -X theirs --allow-unrelated-histories other/master
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
directory: nixpkgs-lib
branch: master