Skip to content

Commit

Permalink
Determine account number
Browse files Browse the repository at this point in the history
  • Loading branch information
sshrihar committed Apr 26, 2024
1 parent a58970d commit be098a4
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/ecs_deploy_docker_taskdef.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ jobs:
fetch-depth: 0
path: ./code

- name: Determine Account Number Source
id: determine_account_number
run: |
if [[ "${{ inputs.account_number }}" =~ ^secret\..*$ ]]; then
echo "account_number_resolved=${{ secrets[format('{0}', inputs.account_number)] }}" >> $GITHUB_OUTPUT
else
echo "account_number_resolved=${{ inputs.account_number }}" >> $GITHUB_OUTPUT
fi
- name: Create taskdef file dynamically using parameters passed
run: |
ls -lrt
Expand All @@ -89,9 +98,10 @@ jobs:
python -m pip install --upgrade pip && \
pip install pipenv && \
pipenv install && \
pipenv run python ${{ env.taskdef_file_script }} -pf \
code/${{ inputs.taskdef_file_vars }} -tt ${{ env.taskdef_file_template }} \
-acc ${{ inputs.account_number }} -app ${{ inputs.app_name }}
pipenv run python ${{ env.taskdef_file_script }} \
-pf code/${{ inputs.taskdef_file_vars }} -tt ${{ env.taskdef_file_template }} \
-acc ${{ needs.determine_account_number.outputs.account_number }} \
-app ${{ inputs.app_name }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand Down

0 comments on commit be098a4

Please sign in to comment.