Skip to content
Open
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
24 changes: 24 additions & 0 deletions .github/workflows/ecr-build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ on:
description: The directory the translations will be written to for the build to use
type: string
required: false
countries_directory:
description: The directory the country data will be written to for the build to use
type: string
required: false
oauth_enabled:
description: This build uses oauth authentication and requires the configuration of keys
type: boolean
Expand Down Expand Up @@ -144,6 +148,26 @@ jobs:
unzip -o /tmp/$pathName -d ${{ inputs.translations_directory }}
chmod -R a+r ${{ inputs.translations_directory }}
echo "-----Translations done-----"
# Download countries if needed
- name: Download translations
if: ${{ inputs.translations_client && inputs.countries_directory }}
run: |
if [ -z "${{secrets.TRANSLATIONS_SECRET}}" ]; then
echo "No secret to download translations"
exit 1
fi
if [ -z "${{inputs.version}}" ]; then
echo "Version parameter is required to download translations"
exit 1
fi

echo "-----Downloading translations-----"
pathName="locales-${{ inputs.image_name }}-${{ inputs.version }}"
pathName=$(echo "$pathName" | sed 's/\//-/g')
wget -S --post-data "cache=1&secret=${{secrets.TRANSLATIONS_SECRET}}&type=countries&client=${{inputs.translations_client}}&version=${{inputs.version}}" -O /tmp/$pathName https://translations.rentman.net/index.php
unzip -o /tmp/$pathName -d ${{ inputs.countries_directory }}
chmod -R a+r ${{ inputs.countries_directory }}
echo "-----Translations done-----"
# Setup docker buildx
- name: Set up Docker Buildx
id: buildx
Expand Down