Skip to content

Commit

Permalink
Action modify
Browse files Browse the repository at this point in the history
  • Loading branch information
shivamguys committed Apr 10, 2024
1 parent fae1297 commit 290f390
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/irctc.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: IRCTC Automation Booking

on:
# schedule:
# # “At minute 0 and 30 past every hour from 12 through 21.”
# - cron: '0,30 12-21 * * *'
push:
branches:
- 'main'
Expand All @@ -20,7 +17,6 @@ on:
jobs:
IRCTC-Booking:
runs-on: ubuntu-latest


steps:
- uses: actions/checkout@v4
Expand All @@ -30,7 +26,21 @@ jobs:
cache: 'pip' # caching pip dependencies
- run: |
pip install -r irctc-captcha-solver/requirements.txt
python3 irctc-captcha-solver/app.py ""
if [ -z "${{ env.USERNAME }}" ]; then
USERNAME="${{ secrets.USERNAME }}"
else
USERNAME="${{ env.USERNAME }}"
fi
if [ -z "${{ env.PASSWORD }}" ]; then
PASSWORD="${{ secrets.PASSWORD }}"
else
PASSWORD="${{ env.PASSWORD }}"
fi
echo ::add-mask::$PASSWORD
echo ::add-mask::$USERNAME
echo PASSWORD=$PASSWORD >> $GITHUB_ENV
echo USERNAME=$USERNAME >> $GITHUB_ENV
# python3 irctc-captcha-solver/app.py "" is used for models to load before starting tatkal tickets

- name: Install Node.js and npm
Expand All @@ -40,7 +50,6 @@ jobs:

- name: Running IRCTC Cypress Script
uses: cypress-io/github-action@v6
# continue-on-error: true
with:
browser: chrome
command: npx cypress run --record --key a15b31a6-b9ee-4678-b9ac-f45a190851fe --browser chrome --env USERNAME=${{inputs.USERNAME}},PASSWORD=${{inputs.PASSWORD}}
command: npx cypress run --record --key a15b31a6-b9ee-4678-b9ac-f45a190851fe --browser chrome --env USERNAME=${{ env.USERNAME }},PASSWORD=${{ env.PASSWORD }}

0 comments on commit 290f390

Please sign in to comment.