Skip to content

update Nix packages #289

update Nix packages

update Nix packages #289

Workflow file for this run

name: "update Nix packages"
on:
schedule:
- cron: '53 18 * * 0-4' # AEST 4:53 am
workflow_dispatch:
inputs:
push: { type: boolean, default: false, required: false }
env:
COMMIT: ${{ github.sha }}
jobs:
update:
strategy:
max-parallel: 1
fail-fast: false
matrix:
pkg: [asli,aslp_web]
runs-on: ubuntu-latest
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 }}' }
- uses: actions/download-artifact@v4
with:
pattern: 'partial-patches-*'
merge-multiple: true
path: prev-patches
- run: |
git config user.name 'github-actions[bot]'
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: git am prev-patches/*
run: |
shopt -s nullglob
set -x
for f in prev-patches/*; do git am "$f"; done
- run: |
nix run .#update -- check -A ${{matrix.pkg}}
- run: |
nix run .#update -- do-upgrade -A ${{matrix.pkg}}
- run: |
git format-patch $COMMIT -o new-patches
shopt -s nullglob
for f in prev-patches/*; do rm -v new-patches/$(basename $f); done
- uses: actions/upload-artifact@v4
with:
name: partial-patches-${{matrix.pkg}}
path: new-patches
if-no-files-found: ignore
collate:
if: ${{ always() }}
runs-on: ubuntu-latest
needs: [ update ]
outputs:
patches: ${{ steps.data.outputs.b64 }}
steps:
- uses: actions/download-artifact@v4
with:
pattern: 'partial-patches-*'
merge-multiple: true
path: prev-patches
- uses: geekyeggo/delete-artifact@v5
with:
name: 'partial-patches-*'
- uses: actions/upload-artifact@v4
with:
name: all-patches
path: prev-patches
if-no-files-found: ignore
- name: Re-upload to public site
id: data
run: |
set -x
(cd prev-patches && tar caf ../patches.tar.zst .)
(printf 'b64=' && base64 -w0 patches.tar.zst && echo) >> "$GITHUB_OUTPUT"
ls -lh *.tar*
build:
needs: [ collate ]
uses: ./.github/workflows/main.yml
with:
patches-b64: ${{ needs.collate.outputs.patches }}
push: ${{ inputs.push || github.event_name == 'schedule' }}
secrets: inherit