Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deployment workflow to handle app name #139

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading