Skip to content

using Dynamic Value in Name #25

using Dynamic Value in Name

using Dynamic Value in Name #25

Workflow file for this run

name: "IRCTC Automation Booking ${{ inputs.BOOKING_DESC }}"

Check failure on line 1 in .github/workflows/irctc.yml

View workflow run for this annotation

GitHub Actions / IRCTC Automation Booking ${{ inputs.BOOKING_DESC }}

Invalid workflow file

The workflow is not valid. .github/workflows/irctc.yml (Line: 1, Col: 7): Unrecognized named-value: 'inputs'. Located at position 1 within expression: inputs.BOOKING_DESC
on:
push:
branches:
- 'main'
pull_request:
workflow_dispatch:
inputs:
BOOKING_DESC:
required: true
type: string
description: "Give Any Name To Your Booking"
USERNAME:
required: true
type: string
description: "Your IRCTC Username"
PASSWORD:
required: true
type: string
description: "Your IRCTC Password"
jobs:
IRCTC-Booking:
runs-on: ubuntu-latest
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)
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
uses: actions/setup-node@v4
with:
node-version: '21.7.1'
- name: Running IRCTC Cypress Script
uses: cypress-io/github-action@v6
with:
browser: chrome
command: npx cypress run --record --key a15b31a6-b9ee-4678-b9ac-f45a190851fe --browser chrome --env USERNAME=${{ inputs.USERNAME || secrets.USERNAME }},PASSWORD=${{ inputs.PASSWORD || secrets.PASSWORD }}