From 0fb234a40d3acb08164fdd064e76a05b9ffe82d3 Mon Sep 17 00:00:00 2001 From: Saurabh Shrihar Date: Mon, 19 Aug 2024 18:49:47 +0400 Subject: [PATCH] Set creds in common workflow --- .github/workflows/execute_ssh.yml | 7 +++++++ .github/workflows/test-ssh.yml | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/execute_ssh.yml b/.github/workflows/execute_ssh.yml index 1d579ff40..605cec0c5 100644 --- a/.github/workflows/execute_ssh.yml +++ b/.github/workflows/execute_ssh.yml @@ -17,6 +17,13 @@ jobs: name: Execute ssh command runs-on: ubuntu-latest steps: + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: eu-west-1 + role-to-assume: arn:aws:iam::657556092833:role/midendev-GithubActionsRole + role-session-name: GithubActionsSession + - name: Execute ssh command id: run_ssm_command run: | diff --git a/.github/workflows/test-ssh.yml b/.github/workflows/test-ssh.yml index 73b5deb70..67c14b636 100644 --- a/.github/workflows/test-ssh.yml +++ b/.github/workflows/test-ssh.yml @@ -19,13 +19,6 @@ jobs: - name: Checkout Code Repository uses: actions/checkout@v3 - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-region: eu-west-1 - role-to-assume: arn:aws:iam::657556092833:role/midendev-GithubActionsRole - role-session-name: GithubActionsSession - call-execute-ssh: uses: ./.github/workflows/execute_ssh.yml needs: setup