From ad1a2ae837df6aa295e087eff544f111f227343f Mon Sep 17 00:00:00 2001 From: woog2roid Date: Mon, 29 Apr 2024 00:08:52 +0900 Subject: [PATCH] setup: add CI workflows --- .github/workflows/cron.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/cron.yml 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