Skip to content

Commit

Permalink
using defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
shivamguys committed Apr 10, 2024
1 parent 290f390 commit f746121
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/irctc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ on:
workflow_dispatch:
inputs:
USERNAME:
default: {{ secrets.USERNAME }}
required: true
type: string
description: "Your IRCTC Username"
PASSWORD:
default: {{ secrets.PASSWORD }}
required: true
type: string
description: "Your IRCTC Password"

jobs:
IRCTC-Booking:
Expand All @@ -26,16 +30,6 @@ jobs:
cache: 'pip' # caching pip dependencies
- run: |
pip install -r irctc-captcha-solver/requirements.txt
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
Expand All @@ -52,4 +46,4 @@ jobs:
uses: cypress-io/github-action@v6
with:
browser: chrome
command: npx cypress run --record --key a15b31a6-b9ee-4678-b9ac-f45a190851fe --browser chrome --env USERNAME=${{ env.USERNAME }},PASSWORD=${{ env.PASSWORD }}
command: npx cypress run --record --key a15b31a6-b9ee-4678-b9ac-f45a190851fe --browser chrome --env USERNAME=${{ inputs.USERNAME }},PASSWORD=${{ inputs.PASSWORD }}

0 comments on commit f746121

Please sign in to comment.