From 7d3e59320e80f91be1d4d0d523c93b3e3e575494 Mon Sep 17 00:00:00 2001 From: Sthope Date: Wed, 23 Aug 2023 02:12:19 +0200 Subject: [PATCH] Add .gitea/workflows/_load.yml --- .gitea/workflows/_load.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .gitea/workflows/_load.yml diff --git a/.gitea/workflows/_load.yml b/.gitea/workflows/_load.yml new file mode 100644 index 0000000..97fd965 --- /dev/null +++ b/.gitea/workflows/_load.yml @@ -0,0 +1,31 @@ +name: _load +on: + workflow_call: + inputs: + site: + required: true + type: string + secrets: + APP_ID: + required: true + APP_PRIVATE_KEY: + required: true +jobs: + load: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: npm run api:load + - uses: actions/setup-node@v3 + if: ${{ !env.ACT }} + with: + node-version: 16 + cache: 'npm' + - run: npm install + - run: CHANNELS_PATH=sites/${{inputs.site}}/*.channels.xml npm run queue:create -- --max-clusters=1 + - run: NODE_OPTIONS=--insecure-http-parser npm run cluster:load -- --timeout=30000 --cluster-id=1 + - run: npm run programs:save + - uses: actions/upload-artifact@v3 + with: + name: database + path: scripts/database