forked from vlaci/nix-doom-emacs
-
Notifications
You must be signed in to change notification settings - Fork 43
52 lines (52 loc) · 1.94 KB
/
update-dependencies.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
name: "Update Dependencies"
on:
workflow_dispatch:
jobs:
update-deps:
name: Update dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v18
with:
extra_nix_config: |
extra-substituters = https://nix-community.cachix.org
extra-trusted-public-keys = nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
- name: Create PRs for dependencies
env:
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_BASE_BRANCH: master
run: |
nix develop -c .github/workflows/update_flake_lock.py
- name: Create PR for updated init.el
env:
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_BASE_BRANCH: master
run: |
nix develop -c .github/workflows/update_init_el.py
automerge-deps:
name: Automerge dependency updates
needs: [update-deps]
runs-on: ubuntu-latest
steps:
- name: Configure git
run: |
git config --global core.autocrlf false
git config --global user.name github-actions[bot]
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com
git config --global init.defaultBranch main
git config --global pull.rebase false
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v18
with:
extra_nix_config: |
extra-substituters = https://nix-community.cachix.org
extra-trusted-public-keys = nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
- name: Run test_dep_update
env:
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_BASE_BRANCH: develop
run: |
nixpkgs="$(nix eval --impure --expr 'toString (builtins.getFlake (toString ./.)).inputs.nixpkgs' | tr -d '"')"
nix-store --realize "$nixpkgs"
NIX_PATH=nixpkgs="$nixpkgs" .github/workflows/test_dep_update.sh