diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml new file mode 100644 index 0000000..4f9c565 --- /dev/null +++ b/.github/workflows/cron.yml @@ -0,0 +1,35 @@ +name: RememVR Daily Check +on: + push: + branches: [main] + schedule: + - cron: "0 23 * * *" + +jobs: + test: + timeout-minutes: 10 + runs-on: ubuntu-latest + permissions: + contents: read + actions: read + steps: + - name: 📦 [Setup] Checkout + uses: actions/checkout@v4 + + - name: 📦 [Setup] Setup Node + uses: actions/setup-node@v4 + with: + node-version: 18 + + - name: 📦 [Setup] Setup .env + run: | + # copy all secrets from github secrets, and create .env file + jq -r 'to_entries|map("\(.key)=\(.value|tostring)")|.[]' <<< "$SECRETS_CONTEXT" > .env + env: + SECRETS_CONTEXT: ${{ toJson(secrets) }} + + - name: 📦 [Setup] Install Dependencies + run: npm install + + - name: ⚙️ [Test] Run Test + run: npm run test