Skip to content

Commit

Permalink
Update deployment workflow to handle app name
Browse files Browse the repository at this point in the history
  • Loading branch information
sshrihar committed Apr 9, 2024
1 parent f1c8853 commit 35e5e59
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@ on:
required: false
type: string
default: "dev"
core_app_name:
type: string
default: "static"

jobs:
deploy_workflow:
name: Deploy static ${{ inputs.environment }}
name: Deploy ${{ inputs.core_app_name }}-${{ inputs.environment }}
permissions:
id-token: write
contents: write
environment: ${{ inputs.environment }}
runs-on: ubuntu-latest
env:
APP_NAME: static-${{ inputs.environment }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -32,13 +33,22 @@ jobs:
;;
"prod")
echo "ACCOUNT_NUMBER=${{ secrets.PROD_ACCOUNT_NUMBER }}" >> $GITHUB_OUTPUT
;;
;;
*)
echo "Error: Unknown environment!"
exit 1
;;
esac
- name: Determine APP name
id: get_app_name
run: |
if [[ "${{ inputs.environment }}" == "prod" ]]; then
echo "APP_NAME=${{ inputs.core_app_name }}-${{ inputs.environment }}" >> $GITHUB_ENV
else
echo "APP_NAME=${{ inputs.core_app_name }}-${{ inputs.environment }}" >> $GITHUB_ENV
fi
- name: Create taskdef file dynamically using parameters passed
run: |
export PIPENV_PIPFILE=.github/taskdefinition_template/Pipfile
Expand Down

0 comments on commit 35e5e59

Please sign in to comment.