debnix action #1617
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: "debnix action" | |
on: | |
schedule: | |
# run everyday at 03:00 | |
- cron: "0 3 * * *" | |
# run everyday at 13:00 | |
- cron: "0 13 * * *" | |
workflow_dispatch: | |
jobs: | |
run: | |
name: update all debnix files | |
runs-on: ubuntu-latest | |
timeout-minutes: 500 | |
environment: cachix | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: data | |
fetch-depth: 1 | |
- name: Install/Setup - NIX | |
uses: cachix/install-nix-action@v30 | |
with: | |
# install_url: https://releases.nixos.org/nix/nix-2.10.3/install | |
# If you chose API tokens for write access OR if you have a private cache | |
nix_path: nixpkgs=channel:nixos-unstable | |
# install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve' | |
# GC 30GB when free space < 3GB | |
extra_nix_config: | | |
experimental-features = nix-command flakes | |
min-free = 3000000000 | |
max-free = 30000000000 | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: kenji | |
# If you chose API tokens for write access OR if you have a private cache | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- name: setup git | |
run: | | |
set -x | |
git config user.name github-actions[bot] | |
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
shell: bash | |
- name: run updater app | |
run: | | |
set -x | |
# create temporary directory for downloads | |
export TMP_DIR=./tmplocal | |
mkdir $TMP_DIR | |
# export WORKERS=5 | |
nix run -L github:"$GITHUB_REPOSITORY" \ | |
--no-write-lock-file \ | |
-- \ | |
--discover 10000000 \ | |
--timeout 150 \ | |
--output ./outputs \ | |
--map ./outputs/maps/debnix.json | |
nix develop -L \ | |
github:"$GITHUB_REPOSITORY"#ciShell \ | |
--no-write-lock-file \ | |
--command \ | |
just-setup > ./justfile | |
nix develop -L \ | |
github:"$GITHUB_REPOSITORY"#ciShell \ | |
--no-write-lock-file \ | |
--command \ | |
just prettify-json | |
rm ./justfile | |
nix run -L github:"$GITHUB_REPOSITORY" \ | |
--no-write-lock-file \ | |
-- \ | |
--generate-map ./outputs | |
git add . | |
git commit -m "$(date)" | |
git push | |
shell: bash |