Skip to content

Commit

Permalink
FIX pipeline dynamodb name substitution
Browse files Browse the repository at this point in the history
  • Loading branch information
YaroslavPshenichnikov committed Nov 16, 2023
1 parent 1f48601 commit 1a3dbc6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/sam-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,18 @@ jobs:
role-skip-session-tagging: true

# Set DynamoDB table name based on branch
- name: Set DynamoDB table name
- name: Set DynamoDB table name variable
run: |
if [[ "${{ github.ref_name }}" == "develop" ]]; then
echo "DYNAMODB_TABLE_NAME=${{ secrets.DEVELOP_DYNAMODB_TABLE_NAME }}" >> $GITHUB_ENV
elif [[ "${{ github.ref_name }}" == "main" ]]; then
echo "DYNAMODB_TABLE_NAME=${{ secrets.MAIN_DYNAMODB_TABLE_NAME }}" >> $GITHUB_ENV
fi
sed -i "s/dynamodb_table_name_placeholder/${DYNAMODB_TABLE_NAME}/g" ./docspace-reverse-proxy/index.mjs
- name: Set DynamoDB table name at function
run: sed -i "s/dynamodb_table_name_placeholder/${DYNAMODB_TABLE_NAME}/g" ./docspace-reverse-proxy/index.mjs

# Set EKS load balancer endpoints
- name: Set ELB configuration
env:
DEFAULT_REGION_ELB: ${{ secrets.DEFAULT_REGION_ELB }}
Expand Down

0 comments on commit 1a3dbc6

Please sign in to comment.