From 94e068b33003a44c3cca0d0639ed1a279db9fb83 Mon Sep 17 00:00:00 2001 From: Rohan Kapoor Date: Fri, 28 Feb 2025 14:00:20 -0800 Subject: [PATCH 1/2] Create a separate action that runs daily for specific manufacturers --- .github/workflows/run_autodl_daily.yml | 51 ++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/run_autodl_daily.yml diff --git a/.github/workflows/run_autodl_daily.yml b/.github/workflows/run_autodl_daily.yml new file mode 100644 index 00000000..b310b30f --- /dev/null +++ b/.github/workflows/run_autodl_daily.yml @@ -0,0 +1,51 @@ +name: Run auto download +on: + schedule: + - cron: '0 0 * * *' + +env: + # comma separate values, no spaces + MANUFACTURERS_TO_PROCESS: "inovelli" + +permissions: + contents: write + +jobs: + run-autodl: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + with: + version: 9 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: https://registry.npmjs.org/ + cache: pnpm + + - name: Install dependencies + run: pnpm i --frozen-lockfile + + - name: Build + run: pnpm run build + + - name: Run Autodl + uses: actions/github-script@v7 + env: + NODE_EXTRA_CA_CERTS: cacerts.pem + with: + script: | + const {runAutodl} = await import("${{ github.workspace }}/dist/ghw_run_autodl.js") + + await runAutodl(github, core, context, "$MANUFACTURERS_TO_PROCESS") + + - name: Commit changes + run: | + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + git add . + git commit -m "Autodl update" || echo 'Nothing to commit' + git push From 549888a11e4d8e5f5d3213100ff6ffe2c47fc5e6 Mon Sep 17 00:00:00 2001 From: Rohan Kapoor Date: Fri, 28 Feb 2025 20:24:39 -0800 Subject: [PATCH 2/2] Changes from code review --- .github/workflows/run_autodl_daily.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run_autodl_daily.yml b/.github/workflows/run_autodl_daily.yml index b310b30f..b8001e52 100644 --- a/.github/workflows/run_autodl_daily.yml +++ b/.github/workflows/run_autodl_daily.yml @@ -1,7 +1,7 @@ -name: Run auto download +name: Run daily auto download on: schedule: - - cron: '0 0 * * *' + - cron: '0 12 * * *' env: # comma separate values, no spaces @@ -47,5 +47,5 @@ jobs: git config --global user.name 'github-actions[bot]' git config --global user.email 'github-actions[bot]@users.noreply.github.com' git add . - git commit -m "Autodl update" || echo 'Nothing to commit' + git commit -m "Daily autodl update" || echo 'Nothing to commit' git push