Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
CI: update actions to latest versions and use bot credentials to generate token (#2957)
Chethan Rao5767cecab5c8
diff --git a/.github/workflows/CI-pr.yml b/.github/workflows/CI-pr.ymlindex c79ffa6370..ecb13f3c1a 100644--- a/.github/workflows/CI-pr.yml+++ b/.github/workflows/CI-pr.yml@@ -41,17 +41,25 @@ jobs:name: Check formattingruns-on: ubuntu-lateststeps:+ - name: Generate a token+ if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}+ id: generate_token+ uses: actions/create-github-app-token@v1+ with:+ app-id: ${{ secrets.HYPERSWITCH_BOT_APP_ID }}+ private-key: ${{ secrets.HYPERSWITCH_BOT_APP_PRIVATE_KEY }}+- name: Checkout repository with tokenif: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}- uses: actions/checkout@v3+ uses: actions/checkout@v4with:fetch-depth: 0ref: ${{ github.event.pull_request.head.ref }}- token: ${{ secrets.AUTO_FILE_UPDATE_PAT }}+ token: ${{ steps.generate_token.outputs.token }}- name: Checkout repository for forkif: ${{ github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }}- uses: actions/checkout@v3+ uses: actions/checkout@v4- name: Install Rustuses: dtolnay/rust-toolchain@master@@ -71,8 +79,8 @@ jobs:cargo +nightly fmt --allif ! git diff --exit-code --quiet -- crates; thenecho "::notice::Formatting check failed"- git config --local user.name 'github-actions[bot]'- git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com'+ git config --local user.name 'hyperswitch-bot[bot]'+ git config --local user.email '148525504+hyperswitch-bot[bot]@users.noreply.github.com'git add cratesgit commit --message 'chore: run formatter'git push@@ -91,7 +99,7 @@ jobs:steps:- name: Checkout repository- uses: actions/checkout@v3+ uses: actions/checkout@v4- name: "Fetch base branch"shell: bash@@ -108,12 +116,12 @@ jobs:with:toolchain: 1.65- - uses: Swatinem/[email protected]+ - uses: Swatinem/[email protected]with:save-if: ${{ github.event_name == 'push' }}- name: Install cargo-hack- uses: baptiste0928/[email protected]+ uses: baptiste0928/[email protected]with:crate: cargo-hackversion: 0.6.5@@ -280,7 +288,7 @@ jobs:# steps:# - name: Checkout repository- # uses: actions/checkout@v3+ # uses: actions/checkout@v4# - name: Run cargo-deny# uses: EmbarkStudios/[email protected]@@ -299,17 +307,25 @@ jobs:# - windows-lateststeps:+ - name: Generate a token+ if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}+ id: generate_token+ uses: actions/create-github-app-token@v1+ with:+ app-id: ${{ secrets.HYPERSWITCH_BOT_APP_ID }}+ private-key: ${{ secrets.HYPERSWITCH_BOT_APP_PRIVATE_KEY }}+- name: Checkout repository for forkif: ${{ (github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name) }}- uses: actions/checkout@v3+ uses: actions/checkout@v4- name: Checkout repository with tokenif: ${{ (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name) }}- uses: actions/checkout@v3+ uses: actions/checkout@v4with:fetch-depth: 0ref: ${{ github.event.pull_request.head.ref }}- token: ${{ secrets.AUTO_FILE_UPDATE_PAT }}+ token: ${{ steps.generate_token.outputs.token }}- name: "Fetch base branch"shell: bash@@ -328,16 +344,16 @@ jobs:components: clippy- name: Install cargo-hack- uses: baptiste0928/[email protected]+ uses: baptiste0928/[email protected]with:crate: cargo-hack# - name: Install cargo-nextest- # uses: baptiste0928/[email protected]+ # uses: baptiste0928/[email protected]# with:# crate: cargo-nextest- - uses: Swatinem/[email protected]+ - uses: Swatinem/[email protected]with:save-if: ${{ github.event_name == 'push' }}@@ -360,8 +376,8 @@ jobs:shell: bashrun: |if ! git diff --quiet --exit-code -- Cargo.lock ; then- git config --local user.name 'github-actions[bot]'- git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com'+ git config --local user.name 'hyperswitch-bot[bot]'+ git config --local user.email '148525504+hyperswitch-bot[bot]@users.noreply.github.com'git add Cargo.lockgit commit --message 'chore: update Cargo.lock'git push@@ -516,7 +532,7 @@ jobs:runs-on: ubuntu-lateststeps:- name: Checkout repository- uses: actions/checkout@v3+ uses: actions/checkout@v4- name: Spell checkuses: crate-ci/typos@masterdiff --git a/.github/workflows/CI-push.yml b/.github/workflows/CI-push.ymlindex edc9317e52..a6a4bde5a5 100644--- a/.github/workflows/CI-push.yml+++ b/.github/workflows/CI-push.yml@@ -25,7 +25,7 @@ jobs:runs-on: ubuntu-lateststeps:- name: Checkout repository- uses: actions/checkout@v3+ uses: actions/checkout@v4- name: Install Rustuses: dtolnay/rust-toolchain@master@@ -50,7 +50,7 @@ jobs:steps:- name: Checkout repository- uses: actions/checkout@v3+ uses: actions/checkout@v4- name: Install mold linkeruses: rui314/setup-mold@v1@@ -63,12 +63,12 @@ jobs:with:toolchain: 1.65- - uses: Swatinem/[email protected]+ - uses: Swatinem/[email protected]with:save-if: ${{ github.event_name == 'push' }}- name: Install cargo-hack- uses: baptiste0928/[email protected]+ uses: baptiste0928/[email protected]with:crate: cargo-hackversion: 0.6.5@@ -101,7 +101,7 @@ jobs:# steps:# - name: Checkout repository- # uses: actions/checkout@v3+ # uses: actions/checkout@v4# - name: Run cargo-deny# uses: EmbarkStudios/[email protected]@@ -121,7 +121,7 @@ jobs:steps:- name: Checkout repository- uses: actions/checkout@v3+ uses: actions/checkout@v4- name: Install mold linkeruses: rui314/setup-mold@v1@@ -136,16 +136,16 @@ jobs:components: clippy- name: Install cargo-hack- uses: baptiste0928/[email protected]+ uses: baptiste0928/[email protected]with:crate: cargo-hack# - name: Install cargo-nextest- # uses: baptiste0928/[email protected]+ # uses: baptiste0928/[email protected]# with:# crate: cargo-nextest- - uses: Swatinem/[email protected]+ - uses: Swatinem/[email protected]with:save-if: ${{ github.event_name == 'push' }}@@ -178,7 +178,7 @@ jobs:runs-on: ubuntu-lateststeps:- name: Checkout repository- uses: actions/checkout@v3+ uses: actions/checkout@v4- name: Spell checkuses: crate-ci/typos@masterdiff --git a/.github/workflows/auto-release-tag.yml b/.github/workflows/auto-release-tag.ymlindex 5334c914cd..4555b68764 100644--- a/.github/workflows/auto-release-tag.yml+++ b/.github/workflows/auto-release-tag.yml@@ -10,18 +10,18 @@ jobs:runs-on: ubuntu-lateststeps:- - uses: actions/checkout@v3+ - uses: actions/checkout@v4with:fetch-depth: 0- name: Login to Docker Hub- uses: docker/login-action@v2+ uses: docker/login-action@v3with:username: ${{ secrets.DOCKERHUB_USER }}password: ${{ secrets.DOCKERHUB_PASSWD }}- name: Build and push router Docker image- uses: docker/build-push-action@v4+ uses: docker/build-push-action@v5with:build-args: |BINARY=router@@ -30,7 +30,7 @@ jobs:tags: juspaydotin/orca:${{ github.ref_name }}, juspaydotin/hyperswitch-router:${{ github.ref_name }}- name: Build and push consumer Docker image- uses: docker/build-push-action@v4+ uses: docker/build-push-action@v5with:build-args: |BINARY=scheduler@@ -40,7 +40,7 @@ jobs:tags: juspaydotin/orca-consumer:${{ github.ref_name }}, juspaydotin/hyperswitch-consumer:${{ github.ref_name }}- name: Build and push producer Docker image- uses: docker/build-push-action@v4+ uses: docker/build-push-action@v5with:build-args: |BINARY=scheduler@@ -50,7 +50,7 @@ jobs:tags: juspaydotin/orca-producer:${{ github.ref_name }}, juspaydotin/hyperswitch-producer:${{ github.ref_name }}- name: Build and push drainer Docker image- uses: docker/build-push-action@v4+ uses: docker/build-push-action@v5with:build-args: |BINARY=drainerdiff --git a/.github/workflows/connector-sanity-tests.yml b/.github/workflows/connector-sanity-tests.ymlindex 40a3c36125..48e6a946a4 100644--- a/.github/workflows/connector-sanity-tests.yml+++ b/.github/workflows/connector-sanity-tests.yml@@ -79,14 +79,14 @@ jobs:steps:- name: Checkout repository- uses: actions/checkout@v3+ uses: actions/checkout@v4- name: Install Rustuses: dtolnay/rust-toolchain@masterwith:toolchain: stable 2 weeks ago- - uses: Swatinem/[email protected]+ - uses: Swatinem/[email protected]- name: Decrypt connector auth fileenv:diff --git a/.github/workflows/connector-ui-sanity-tests.yml b/.github/workflows/connector-ui-sanity-tests.ymlindex 5db45f2962..d4317681a1 100644--- a/.github/workflows/connector-ui-sanity-tests.yml+++ b/.github/workflows/connector-ui-sanity-tests.yml@@ -82,7 +82,7 @@ jobs:- name: Checkout repositoryif: ${{ (github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name) }}- uses: actions/checkout@v3+ uses: actions/checkout@v4- name: Decrypt connector auth fileif: ${{ (github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name) }}@@ -113,10 +113,10 @@ jobs:toolchain: stable- name: Build and Cache Rust Dependencies- uses: Swatinem/[email protected]+ uses: Swatinem/[email protected]- name: Install Diesel CLI with Postgres Support- uses: baptiste0928/[email protected]+ uses: baptiste0928/[email protected]if: ${{ (github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name) }}with:crate: diesel_clidiff --git a/.github/workflows/conventional-commit-check.yml b/.github/workflows/conventional-commit-check.ymlindex 5fd25e9332..ad01642068 100644--- a/.github/workflows/conventional-commit-check.yml+++ b/.github/workflows/conventional-commit-check.yml@@ -45,7 +45,7 @@ jobs:with:toolchain: stable 2 weeks ago- - uses: baptiste0928/[email protected]+ - uses: baptiste0928/[email protected]with:crate: cocogittodiff --git a/.github/workflows/create-hotfix-branch.yml b/.github/workflows/create-hotfix-branch.ymlindex 77a8bad6bc..6fd2d49477 100644--- a/.github/workflows/create-hotfix-branch.yml+++ b/.github/workflows/create-hotfix-branch.yml@@ -8,11 +8,19 @@ jobs:runs-on: ubuntu-lateststeps:+ - name: Generate a token+ if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}+ id: generate_token+ uses: actions/create-github-app-token@v1+ with:+ app-id: ${{ secrets.HYPERSWITCH_BOT_APP_ID }}+ private-key: ${{ secrets.HYPERSWITCH_BOT_APP_PRIVATE_KEY }}+- name: Checkout repository- uses: actions/checkout@v3+ uses: actions/checkout@v4with:fetch-depth: 0- token: ${{ secrets.AUTO_RELEASE_PAT }}+ token: ${{ steps.generate_token.outputs.token }}- name: Check if the input is valid tagshell: bashdiff --git a/.github/workflows/create-hotfix-tag.yml b/.github/workflows/create-hotfix-tag.ymlindex 45699bda24..e9df004139 100644--- a/.github/workflows/create-hotfix-tag.yml+++ b/.github/workflows/create-hotfix-tag.yml@@ -8,14 +8,22 @@ jobs:runs-on: ubuntu-lateststeps:+ - name: Generate a token+ if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}+ id: generate_token+ uses: actions/create-github-app-token@v1+ with:+ app-id: ${{ secrets.HYPERSWITCH_BOT_APP_ID }}+ private-key: ${{ secrets.HYPERSWITCH_BOT_APP_PRIVATE_KEY }}+- name: Checkout repository- uses: actions/checkout@v3+ uses: actions/checkout@v4with:fetch-depth: 0- token: ${{ secrets.AUTO_RELEASE_PAT }}+ token: ${{ steps.generate_token.outputs.token }}- name: Install git-cliff- uses: baptiste0928/[email protected]+ uses: baptiste0928/[email protected]with:crate: git-cliffversion: 1.2.0@@ -86,8 +94,8 @@ jobs:- name: Set Git Configurationshell: bashrun: |- git config --local user.name 'github-actions'- git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com'+ git config --local user.name 'hyperswitch-bot[bot]'+ git config --local user.email '148525504+hyperswitch-bot[bot]@users.noreply.github.com'- name: Push created commit and tagshell: bashdiff --git a/.github/workflows/hotfix-pr-check.yml b/.github/workflows/hotfix-pr-check.ymlindex 7a724b6025..e178ba31c1 100644--- a/.github/workflows/hotfix-pr-check.yml+++ b/.github/workflows/hotfix-pr-check.yml@@ -15,7 +15,7 @@ jobs:runs-on: ubuntu-lateststeps:- name: Checkout repository- uses: actions/checkout@v3+ uses: actions/checkout@v4- name: Get hotfix pull request bodyshell: bashdiff --git a/.github/workflows/manual-release.yml b/.github/workflows/manual-release.ymlindex 0b70631e11..9ae80047a6 100644--- a/.github/workflows/manual-release.yml+++ b/.github/workflows/manual-release.yml@@ -17,18 +17,18 @@ jobs:runs-on: ubuntu-lateststeps:- - uses: actions/checkout@v3+ - uses: actions/checkout@v4with:fetch-depth: 0- name: Login to Docker Hub- uses: docker/login-action@v2+ uses: docker/login-action@v3with:username: ${{ secrets.DOCKERHUB_USER }}password: ${{ secrets.DOCKERHUB_PASSWD }}- name: Build and push router Docker image- uses: docker/build-push-action@v4+ uses: docker/build-push-action@v5with:build-args: |RUN_ENV=${{ inputs.environment }}@@ -39,7 +39,7 @@ jobs:tags: juspaydotin/orca:${{ github.sha }}- name: Build and push consumer Docker image- uses: docker/build-push-action@v4+ uses: docker/build-push-action@v5with:build-args: |RUN_ENV=${{ inputs.environment }}@@ -50,7 +50,7 @@ jobs:tags: juspaydotin/orca-consumer:${{ github.sha }}- name: Build and push producer Docker image- uses: docker/build-push-action@v4+ uses: docker/build-push-action@v5with:build-args: |RUN_ENV=${{ inputs.environment }}@@ -61,7 +61,7 @@ jobs:tags: juspaydotin/orca-producer:${{ github.sha }}- name: Build and push drainer Docker image- uses: docker/build-push-action@v4+ uses: docker/build-push-action@v5with:build-args: |RUN_ENV=${{ inputs.environment }}diff --git a/.github/workflows/migration-check.yaml b/.github/workflows/migration-check.yamlindex 0c4baaa961..b740bd3a5b 100644--- a/.github/workflows/migration-check.yaml+++ b/.github/workflows/migration-check.yaml@@ -40,14 +40,14 @@ jobs:steps:- name: Checkout repository- uses: actions/checkout@v3+ uses: actions/checkout@v4- name: Install Rustuses: dtolnay/rust-toolchain@masterwith:toolchain: stable 2 weeks ago- - uses: baptiste0928/[email protected]+ - uses: baptiste0928/[email protected]with:crate: diesel_clifeatures: postgresdiff --git a/.github/workflows/postman-collection-runner.yml b/.github/workflows/postman-collection-runner.ymlindex 3291755b56..d543452071 100644--- a/.github/workflows/postman-collection-runner.yml+++ b/.github/workflows/postman-collection-runner.yml@@ -50,7 +50,7 @@ jobs:steps:- name: Repository checkout- uses: actions/checkout@v3+ uses: actions/checkout@v4- name: Decrypt connector auth fileif: ${{ ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name)) || (github.event_name == 'merge_group')}}@@ -82,11 +82,11 @@ jobs:- name: Build and Cache Rust Dependenciesif: ${{ ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name)) || (github.event_name == 'merge_group')}}- uses: Swatinem/[email protected]+ uses: Swatinem/[email protected]- name: Install Diesel CLI with Postgres Supportif: ${{ ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name)) || (github.event_name == 'merge_group')}}- uses: baptiste0928/[email protected]+ uses: baptiste0928/[email protected]with:crate: diesel_clifeatures: postgresdiff --git a/.github/workflows/pr-title-spell-check.yml b/.github/workflows/pr-title-spell-check.ymlindex 6ab6f18473..03b5a87588 100644--- a/.github/workflows/pr-title-spell-check.yml+++ b/.github/workflows/pr-title-spell-check.yml@@ -13,7 +13,7 @@ jobs:runs-on: ubuntu-lateststeps:- name: Checkout repository- uses: actions/checkout@v3+ uses: actions/checkout@v4- name: Store PR title in a fileshell: bashdiff --git a/.github/workflows/release-new-version.yml b/.github/workflows/release-new-version.ymlindex eda2df0515..b54e240d96 100644--- a/.github/workflows/release-new-version.yml+++ b/.github/workflows/release-new-version.yml@@ -23,11 +23,19 @@ jobs:runs-on: ubuntu-lateststeps:+ - name: Generate a token+ if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}+ id: generate_token+ uses: actions/create-github-app-token@v1+ with:+ app-id: ${{ secrets.HYPERSWITCH_BOT_APP_ID }}+ private-key: ${{ secrets.HYPERSWITCH_BOT_APP_PRIVATE_KEY }}+- name: Checkout repository- uses: actions/checkout@v3+ uses: actions/checkout@v4with:fetch-depth: 0- token: ${{ secrets.AUTO_RELEASE_PAT }}+ token: ${{ steps.generate_token.outputs.token }}- name: Install Rustuses: dtolnay/rust-toolchain@master@@ -35,7 +43,7 @@ jobs:toolchain: stable 2 weeks ago- name: Install cocogitto- uses: baptiste0928/[email protected]+ uses: baptiste0928/[email protected]with:crate: cocogittoversion: 5.4.0@@ -43,8 +51,8 @@ jobs:- name: Set Git Configurationshell: bashrun: |- git config --local user.name 'github-actions'- git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com'+ git config --local user.name 'hyperswitch-bot[bot]'+ git config --local user.email '148525504+hyperswitch-bot[bot]@users.noreply.github.com'- name: Update Postman collection files from Postman directoriesshell: bashdiff --git a/.github/workflows/validate-openapi-spec.yml b/.github/workflows/validate-openapi-spec.ymlindex 530c59c923..bdb987d625 100644--- a/.github/workflows/validate-openapi-spec.yml+++ b/.github/workflows/validate-openapi-spec.yml@@ -16,24 +16,32 @@ jobs:name: Validate generated OpenAPI spec fileruns-on: ubuntu-lateststeps:+ - name: Generate a token+ if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}+ id: generate_token+ uses: actions/create-github-app-token@v1+ with:+ app-id: ${{ secrets.HYPERSWITCH_BOT_APP_ID }}+ private-key: ${{ secrets.HYPERSWITCH_BOT_APP_PRIVATE_KEY }}+- name: Checkout PR from forkif: ${{ (github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name) }}- uses: actions/checkout@v3+ uses: actions/checkout@v4with:ref: ${{ github.event.pull_request.head.ref }}repository: ${{ github.event.pull_request.head.repo.full_name }}- name: Checkout PR with tokenif: ${{ (github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name) }}- uses: actions/checkout@v3+ uses: actions/checkout@v4with:ref: ${{ github.event.pull_request.head.ref }}repository: ${{ github.event.pull_request.head.repo.full_name }}- token: ${{ secrets.AUTO_FILE_UPDATE_PAT }}+ token: ${{ steps.generate_token.outputs.token }}- name: Checkout merge group HEAD commitif: ${{ github.event_name == 'merge_group' }}- uses: actions/checkout@v3+ uses: actions/checkout@v4with:ref: ${{ github.event.merge_group.head_sha }}@@ -60,8 +68,8 @@ jobs:shell: bashrun: |if ! git diff --quiet --exit-code -- openapi/openapi_spec.json ; then- git config --local user.name 'github-actions[bot]'- git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com'+ git config --local user.name 'hyperswitch-bot[bot]'+ git config --local user.email '148525504+hyperswitch-bot[bot]@users.noreply.github.com'git add openapi/openapi_spec.jsongit commit --message 'docs(openapi): re-generate OpenAPI specification'git push