From da056692ba71afabf01df1a24febb316b46567d9 Mon Sep 17 00:00:00 2001 From: Shivam Pandey Date: Wed, 10 Apr 2024 14:08:10 +0530 Subject: [PATCH] using UPI ID in Actions --- .github/workflows/irctc.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/irctc.yml b/.github/workflows/irctc.yml index 0513d00..77c5dc7 100644 --- a/.github/workflows/irctc.yml +++ b/.github/workflows/irctc.yml @@ -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 @@ -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 @@ -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 }}