Skip to content

Commit

Permalink
Update add_domain.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
rlaisqls authored May 12, 2024
1 parent 43aab9e commit e2ee353
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/add_domain.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ jobs:
shell: bash
run: |
echo ${{ github.event.client_payload.domain }}
domain_name=$(echo "${{ github.event.client_payload.domain }}" | sed 's/\..*//')
location=$(grep -n "# DOMAIN_NAME" cloudflare.tf | cut -d ":" -f 1)
if [ -n "$location" ]; then
sed -i "${location}s|.*|&\n \"${{ github.event.client_payload.domain }}\",|" cloudflare.tf
sed -i "${location}s|.*|&\n \"$domain_name\",|" cloudflare.tf
fi
- name: Commit with new ECR
Expand Down

0 comments on commit e2ee353

Please sign in to comment.