Removing record to test irctc.yml #92
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: IRCTC Automation Booking | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
USERNAME: | |
required: true | |
type: string | |
description: "Your IRCTC Username" | |
PASSWORD: | |
required: true | |
type: string | |
description: "Your IRCTC Password" | |
UPI_ID: | |
required: false | |
type: string | |
description: "Your UPI ID To Make Payment From" | |
jobs: | |
IRCTC-Booking: | |
runs-on: ubuntu-22.04 | |
steps: | |
- 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 "" # python3 irctc-captcha-solver/app.py "" is used for models to load before starting tatkal tickets | |
PASSWORD=$(jq -r '.inputs.PASSWORD' $GITHUB_EVENT_PATH) | |
USERNAME=$(jq -r '.inputs.USERNAME' $GITHUB_EVENT_PATH) | |
UPI_ID=$(jq -r '.inputs.UPI_ID' $GITHUB_EVENT_PATH) | |
echo ::add-mask::$PASSWORD | |
echo ::add-mask::$USERNAME | |
echo ::add-mask::$UPI_ID | |
echo PASSWORD=$PASSWORD >> $GITHUB_ENV | |
echo USERNAME=$USERNAME >> $GITHUB_ENV | |
echo UPI_ID=$UPI_ID >> $GITHUB_ENV | |
# python3 irctc-captcha-solver/app.py "" is used for models to load before starting tatkal tickets | |
- name: Install Node.js and npm | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.12.2' | |
- name: Running IRCTC Cypress Script | |
uses: cypress-io/github-action@v6 | |
with: | |
command: npx cypress open --browser chrome --env UPI_ID=${{ inputs.UPI_ID || '' }},USERNAME=${{ inputs.USERNAME || secrets.USERNAME }},PASSWORD=${{ inputs.PASSWORD || secrets.PASSWORD }} |