From 3f236615ffb1e213989e0770efd8feb552205541 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Wed, 20 Nov 2024 11:03:07 -0600 Subject: [PATCH] support hosts arg for cron job --- .github/workflows/update.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 4a10265..3cd50ae 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -13,6 +13,9 @@ on: # At minute 00:00 on Monday, Wednesday, and Friday. - cron: 0 0 * * 1,3,5 +env: + hosts: ${{ github.event_name == 'schedule' && 'othalan,algiz' || github.event.inputs.hosts }} + permissions: contents: write @@ -58,7 +61,7 @@ jobs: nix run . -- cache - --host,="${{ inputs.hosts }}" + --host,="${{ env.hosts }}" --flake . --debug -- @@ -101,7 +104,7 @@ jobs: nix run . -- ci update - --host,="${{ inputs.hosts }}" + --host,="${{ env.hosts }}" --flake . --debug -- @@ -109,7 +112,7 @@ jobs: - run: | echo "# system diffs" >> $GITHUB_STEP_SUMMARY - hosts="${{ inputs.hosts }}" + hosts="${{ env.hosts }}" for host in ${hosts//,/ }; do echo "## $host" >> $GITHUB_STEP_SUMMARY nix run "nixpkgs#nvd" -- --color always diff ./$host-current ./$host-updated >> $host-summary.md