Skip to content

Commit 4bcb239

Browse files
authored
Update build.yaml
1 parent fe9986c commit 4bcb239

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

.github/workflows/build.yaml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ on:
1111
domain:
1212
description: 'URL of the Website'
1313
required: true
14-
second_domain:
15-
description: 'Second domain (for example files subdomain)'
14+
additional_domains:
15+
description: 'Additional domains (separated by commas)'
1616
app_name:
1717
description: 'Name of the App'
1818
required: true
@@ -76,11 +76,16 @@ jobs:
7676
echo "PRIMARY_DOMAIN=$DOMAIN" >> $GITHUB_ENV
7777
ALLOWED_DOMAINS="$DOMAIN"
7878
79-
# Validate and add second domain if present
80-
if [ -n "${{ inputs.second_domain }}" ]; then
81-
SECOND_DOMAIN=$(validate_domain "${{ inputs.second_domain }}")
82-
echo "SECOND_DOMAIN=$SECOND_DOMAIN" >> $GITHUB_ENV
83-
ALLOWED_DOMAINS="$ALLOWED_DOMAINS,$SECOND_DOMAIN"
79+
# Validate and add additional domains if present
80+
if [ -n "${{ inputs.additional_domains }}" ]; then
81+
# Split by comma and process each domain
82+
IFS=',' read -ra ADDITIONAL_DOMAINS <<< "${{ inputs.additional_domains }}"
83+
for DOMAIN_TO_ADD in "${ADDITIONAL_DOMAINS[@]}"; do
84+
if [ -n "$DOMAIN_TO_ADD" ]; then
85+
VALIDATED_DOMAIN=$(validate_domain "$DOMAIN_TO_ADD")
86+
ALLOWED_DOMAINS="$ALLOWED_DOMAINS,$VALIDATED_DOMAIN"
87+
fi
88+
done
8489
fi
8590
8691
echo "ALLOWED_DOMAINS=$ALLOWED_DOMAINS" >> $GITHUB_ENV
@@ -151,7 +156,7 @@ jobs:
151156
body: |
152157
Restricted WebView App.
153158
Domain: [${{ env.PRIMARY_DOMAIN }}](//${{ env.PRIMARY_DOMAIN }})
154-
Second Domain: [${{ env.SECOND_DOMAIN }}](//${{ env.SECOND_DOMAIN }})
159+
Additional Domains: ${{ inputs.additional_domains }}
155160
No Secured: ${{ inputs.no_ssl }}
156161
App Name: ${{ inputs.app_name }}
157162
View Mode: ${{ inputs.view_mode }}
@@ -160,4 +165,4 @@ jobs:
160165
Custom Icon: ${{ inputs.icon_url }}
161166
- name: Get the APK URL
162167
run: |
163-
echo "APK URL: ${{ fromJSON(steps.create_release.outputs.assets)[0].browser_download_url }}"
168+
echo "APK URL: ${{ fromJSON(steps.create_release.outputs.assets)[0].browser_download_url }}"

0 commit comments

Comments
 (0)