monthly nixpkgs sync #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |