Skip to content

Commit

Permalink
using UPI ID in Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
shivamguys committed Apr 10, 2024
1 parent 4b00029 commit da05669
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/irctc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
pull_request:
workflow_dispatch:
inputs:
UPI_ID:
default: ""
required: false
type: string
description: "Your UPI ID To Make Payment From"
USERNAME:
required: true
type: string
Expand All @@ -29,10 +34,16 @@ jobs:
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

Expand All @@ -45,4 +56,4 @@ jobs:
uses: cypress-io/github-action@v6
with:
browser: chrome
command: npx cypress run --record --key a15b31a6-b9ee-4678-b9ac-f45a190851fe --env USERNAME=${{ inputs.USERNAME || secrets.USERNAME }},PASSWORD=${{ inputs.PASSWORD || secrets.PASSWORD }}
command: npx cypress run --record --key a15b31a6-b9ee-4678-b9ac-f45a190851fe --env UPI_ID=${{ env.UPI_ID }},USERNAME=${{ inputs.USERNAME || secrets.USERNAME }},PASSWORD=${{ inputs.PASSWORD || secrets.PASSWORD }}

0 comments on commit da05669

Please sign in to comment.