name: Update packages on: schedule: - cron: '0 6 * * 1' workflow_dispatch: permissions: contents: write pull-requests: write jobs: update: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v31 with: extra_nix_config: | experimental-features = nix-command flakes access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - name: Update packages run: | for pkg_dir in pkgs/*/; do pkg="$(basename "$pkg_dir")" default_nix="${pkg_dir}default.nix" [ -f "$default_nix" ] || continue if grep -qE 'buildGoModule|buildGo[0-9]+Module' "$default_nix"; then echo "==> $pkg (go)" nix run nixpkgs#nix-update -- --flake --build "$pkg" || true elif grep -qE 'buildPythonApplication|buildPythonPackage' "$default_nix"; then echo "==> $pkg (python)" nix run nixpkgs#nix-update -- --flake "$pkg" || true fi done - name: Update README package list run: python3 scripts/update-readme.py env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Clean build results run: rm -rf result result-* - uses: peter-evans/create-pull-request@v7 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: "auto-update: bump package versions" title: "Auto-update packages" body: | Automated package updates via `nix-update`. Check individual diffs to see what changed. branch: auto-update delete-branch: true