From a4962f244b9a24fd80fb84153a7301b6ac3f9abf Mon Sep 17 00:00:00 2001 From: Gytis Ivaskevicius Date: Wed, 2 Oct 2024 14:16:43 +0300 Subject: [PATCH] ci: fix role-to-assume if statement for cardano-services CI --- .github/workflows/cardano-services.yaml | 2 +- nix/cardano-services/deployments/ci.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cardano-services.yaml b/.github/workflows/cardano-services.yaml index 5902de341ba..e3ca9071c78 100644 --- a/.github/workflows/cardano-services.yaml +++ b/.github/workflows/cardano-services.yaml @@ -10,7 +10,7 @@ jobs: - uses: aws-actions/configure-aws-credentials@v4.0.2 with: aws-region: us-east-1 - role-to-assume: ${{ github.ref == 'refs/heads/master' && 'arn:aws:iam::926093910549:role/eks-admin' + role-to-assume: ${{ contains(github.ref, "release/") && 'arn:aws:iam::926093910549:role/eks-admin' || 'arn:aws:iam::926093910549:role/eks-devs' }} - name: 🚀 Deploy run: 'echo "yes" | nix run .#cardano-services.${{inputs.target}}.${{inputs.action}} diff --git a/nix/cardano-services/deployments/ci.nix b/nix/cardano-services/deployments/ci.nix index 04aa664f37d..9f206f0afb8 100644 --- a/nix/cardano-services/deployments/ci.nix +++ b/nix/cardano-services/deployments/ci.nix @@ -19,7 +19,7 @@ extraSteps = lib.singleton { uses = "aws-actions/configure-aws-credentials@v4.0.2"; "with" = { - role-to-assume = "\${{ github.ref == 'refs/heads/master' && 'arn:aws:iam::926093910549:role/eks-admin' || 'arn:aws:iam::926093910549:role/eks-devs' }}"; + role-to-assume = "\${{ contains(github.ref, \"release/\") && 'arn:aws:iam::926093910549:role/eks-admin' || 'arn:aws:iam::926093910549:role/eks-devs' }}"; aws-region = "us-east-1"; }; };