Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/wolt-cibus-automation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Wolt Credits Purchase Automation

on:
schedule:
# Run on the 18th of every month at 10:00 AM UTC
- cron: '0 10 18 * *'
workflow_dispatch: # Allow manual triggering for testing

jobs:
buy-wolt-credits:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
working-directory: ./automation
run: npm ci

- name: Install Playwright browsers
working-directory: ./automation
run: npx playwright install --with-deps chromium

- name: Run Wolt-Cibus automation
working-directory: ./automation
env:
CIBUS_EMAIL: ${{ secrets.CIBUS_EMAIL }}
CIBUS_PASSWORD: ${{ secrets.CIBUS_PASSWORD }}
WOLT_EMAIL: ${{ secrets.WOLT_EMAIL }}
WOLT_PASSWORD: ${{ secrets.WOLT_PASSWORD }}
WOLT_PHONE: ${{ secrets.WOLT_PHONE }}
run: node index.js

- name: Upload screenshots on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: failure-screenshots
path: automation/screenshots/
retention-days: 7


Loading
Loading