@@ -642,12 +642,17 @@ jobs:
642642 addon-name : ${{ needs.setup.outputs.addon-name }}
643643 sc4s-version : ${{ matrix.sc4s.version }}
644644 sc4s-docker-registry : ${{ matrix.sc4s.docker_registry }}
645+ - name : Read secrets from AWS Secrets Manager again into environment variables in case credential rotation
646+ id : update-argo-token
647+ run : |
648+ ARGO_TOKEN=$(aws secretsmanager get-secret-value --secret-id ta-github-workflow-automation-token | jq -r '.SecretString')
649+ echo "::set-output name=argo-token::$ARGO_TOKEN"
645650 - name : Check if pod was deleted
646651 id : is-pod-deleted
647652 if : always()
648653 shell : bash
649654 env :
650- ARGO_TOKEN : ${{ steps.get -argo-token.outputs.argo-token }}
655+ ARGO_TOKEN : ${{ steps.update -argo-token.outputs.argo-token }}
651656 run : |
652657 set -o xtrace
653658 if argo watch ${{ steps.run-tests.outputs.workflow-name }} -n workflows | grep "pod deleted"; then
@@ -657,7 +662,7 @@ jobs:
657662 id : retry-wf
658663 shell : bash
659664 env :
660- ARGO_TOKEN : ${{ steps.get -argo-token.outputs.argo-token }}
665+ ARGO_TOKEN : ${{ steps.update -argo-token.outputs.argo-token }}
661666 if : always()
662667 run : |
663668 set -o xtrace
@@ -674,7 +679,7 @@ jobs:
674679 fi
675680 - name : check if workflow completed
676681 env :
677- ARGO_TOKEN : ${{ steps.get -argo-token.outputs.argo-token }}
682+ ARGO_TOKEN : ${{ steps.update -argo-token.outputs.argo-token }}
678683 shell : bash
679684 if : always()
680685 run : |
@@ -813,12 +818,17 @@ jobs:
813818 addon-name : ${{ needs.setup.outputs.addon-name }}
814819 vendor-version : ${{ matrix.vendor-version.image }}
815820 sc4s-version : " No"
821+ - name : Read secrets from AWS Secrets Manager again into environment variables in case credential rotation
822+ id : update-argo-token
823+ run : |
824+ ARGO_TOKEN=$(aws secretsmanager get-secret-value --secret-id ta-github-workflow-automation-token | jq -r '.SecretString')
825+ echo "::set-output name=argo-token::$ARGO_TOKEN"
816826 - name : Check if pod was deleted
817827 id : is-pod-deleted
818828 if : always()
819829 shell : bash
820830 env :
821- ARGO_TOKEN : ${{ steps.get -argo-token.outputs.argo-token }}
831+ ARGO_TOKEN : ${{ steps.update -argo-token.outputs.argo-token }}
822832 run : |
823833 set -o xtrace
824834 if argo watch ${{ steps.run-tests.outputs.workflow-name }} -n workflows | grep "pod deleted" ; then
@@ -828,7 +838,7 @@ jobs:
828838 id : retry-wf
829839 shell : bash
830840 env :
831- ARGO_TOKEN : ${{ steps.get -argo-token.outputs.argo-token }}
841+ ARGO_TOKEN : ${{ steps.update -argo-token.outputs.argo-token }}
832842 if : always()
833843 run : |
834844 set -o xtrace
@@ -845,7 +855,7 @@ jobs:
845855 fi
846856 - name : check if workflow completed
847857 env :
848- ARGO_TOKEN : ${{ steps.get -argo-token.outputs.argo-token }}
858+ ARGO_TOKEN : ${{ steps.update -argo-token.outputs.argo-token }}
849859 if : always()
850860 shell : bash
851861 run : |
@@ -983,12 +993,17 @@ jobs:
983993 addon-name : ${{ needs.setup.outputs.addon-name }}
984994 vendor-version : ${{ matrix.vendor-version.image }}
985995 sc4s-version : " No"
996+ - name : Read secrets from AWS Secrets Manager again into environment variables in case credential rotation
997+ id : update-argo-token
998+ run : |
999+ ARGO_TOKEN=$(aws secretsmanager get-secret-value --secret-id ta-github-workflow-automation-token | jq -r '.SecretString')
1000+ echo "::set-output name=argo-token::$ARGO_TOKEN"
9861001 - name : Check if pod was deleted
9871002 id : is-pod-deleted
9881003 if : always()
9891004 shell : bash
9901005 env :
991- ARGO_TOKEN : ${{ steps.get -argo-token.outputs.argo-token }}
1006+ ARGO_TOKEN : ${{ steps.update -argo-token.outputs.argo-token }}
9921007 run : |
9931008 set -o xtrace
9941009 if argo watch ${{ steps.run-tests.outputs.workflow-name }} -n workflows | grep "pod deleted"; then
@@ -998,7 +1013,7 @@ jobs:
9981013 id : retry-wf
9991014 shell : bash
10001015 env :
1001- ARGO_TOKEN : ${{ steps.get -argo-token.outputs.argo-token }}
1016+ ARGO_TOKEN : ${{ steps.update -argo-token.outputs.argo-token }}
10021017 if : always()
10031018 run : |
10041019 set -o xtrace
@@ -1015,7 +1030,7 @@ jobs:
10151030 fi
10161031 - name : check if workflow completed
10171032 env :
1018- ARGO_TOKEN : ${{ steps.get -argo-token.outputs.argo-token }}
1033+ ARGO_TOKEN : ${{ steps.update -argo-token.outputs.argo-token }}
10191034 if : always()
10201035 shell : bash
10211036 run : |
0 commit comments