-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (44 loc) · 1.41 KB
/
monthly.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: "monthly nixpkgs sync"
on:
schedule:
- cron: "53 15 18 * *" # AEST 1:53 am on 18th day each month
workflow_dispatch:
inputs:
push: { type: boolean, default: false, required: false }
env:
COMMIT: ${{ github.sha }}
jobs:
flake-update:
runs-on: ubuntu-24.04
outputs:
patches: ${{ steps.data.outputs.b64 }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
- uses: cachix/cachix-action@v14
with: { name: pac-nix, authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' }
- run: |
git pull
git config user.name 'github-actions[bot]'
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- run: |
nix flake update --commit-lock-file
- run: |
nix run github:katrinafyi/nix-patcher -- --commit --update
- run: |
git format-patch $COMMIT -o new-patches
- name: Encode patches
id: data
run: |
touch patches.tar.zst
[[ -d new-patches ]] && (cd new-patches && tar caf ../patches.tar.zst .)
(printf 'b64=' && base64 -w0 patches.tar.zst && echo) >> "$GITHUB_OUTPUT"
ls -lh *.tar*
monthly-build:
if: always()
needs: [ flake-update ]
uses: ./.github/workflows/main.yml
with:
patches-b64: ${{ needs.flake-update.outputs.patches }}
push: ${{ inputs.push || github.event_name == 'schedule' }}
secrets: inherit