-
-
Notifications
You must be signed in to change notification settings - Fork 279
59 lines (48 loc) · 1.57 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: IRCTC Booking
on:
# schedule:
# # “At minute 0 and 30 past every hour from 12 through 21.”
# - cron: '0,30 12-21 * * *'
push:
branches:
- 'feature/*'
pull_request:
workflow_dispatch:
inputs:
USERNAME:
required: true
type: string
PASSWORD:
required: true
type: string
jobs:
IRCTC-Booking:
runs-on: ubuntu-latest
steps:
- name: Mask PASSWORD and USERNAME
run: |
PASSWORD=$(jq -r '.inputs.PASSWORD' $GITHUB_EVENT_PATH)
USERNAME=$(jq -r '.inputs.USERNAME' $GITHUB_EVENT_PATH)
echo ::add-mask::$PASSWORD
echo ::add-mask::$USERNAME
echo PASSWORD=$PASSWORD >> $GITHUB_ENV
echo USERNAME=$USERNAME >> $GITHUB_ENV
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip' # caching pip dependencies
- run: |
pip install -r irctc-captcha-solver/requirements.txt
python3 irctc-captcha-solver/app.py --image-base-64 ""
# python3 irctc-captcha-solver/app.py --image-base-64 "" is used for models to load before starting tatkal tickets
- name: Install Node.js and npm
uses: actions/setup-node@v4
with:
node-version: '21.7.1'
- name: Running IRCTC Cypress Script
uses: cypress-io/github-action@v6
# continue-on-error: true
with:
browser: chrome
command: npx cypress run --record --key 967b25a7-e4dd-4b5b-a143-d799131b2d3b --browser chrome --env USERNAME=${{env.USERNAME}},PASSWORD=${{env.PASSWORD}}