Skip to content

Loading spinner appears in the right place when Callout is loading (#… #1523

Loading spinner appears in the right place when Callout is loading (#…

Loading spinner appears in the right place when Callout is loading (#… #1523

name: Build & Deploy to Dev
on:
push:
branches: [develop]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: 'Checkout github Action'
uses: actions/[email protected]
- name: Prepare
id: prep
run: |
DOCKER_IMAGE=alkemio/client-web
VERSION=noop
if [ "${{ github.event_name }}" = "schedule" ]; then
VERSION=nightly
elif [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
elif [[ $GITHUB_REF == refs/heads/* ]]; then
VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g')
if [ "${{ github.event.repository.default_branch }}" = "$VERSION" ]; then
VERSION=edge
fi
elif [[ $GITHUB_REF == refs/pull/* ]]; then
VERSION=pr-${{ github.event.number }}
fi
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "created={$(date -u +'%Y-%m-%dT%H:%M:%SZ')}" >> $GITHUB_OUTPUT
- name: 'Download and extract translations'
uses: crowdin/[email protected]
with:
command: 'download'
command_args: '--all --verbose'
source: ./src/core/i18n/en/translation.en.json
translation: ./src/core/i18n/%two_letters_code%/translation.%two_letters_code%.json
download_translations: false
upload_sources: false
upload_translations: false
push_translations: false
push_sources: false
project_id: ${{ secrets.CROWDIN_PROJECT_ID }}
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
env:
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
- name: 'Login via Azure CLI'
uses: azure/[email protected]
with:
creds: ${{ secrets.AZURE_CRED_K8S_NEW }}
- name: 'Build and push image'
uses: azure/[email protected]
env:
NODE_ENV: production
with:
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- run: |
docker build --build-arg ARG_GRAPHQL_ENDPOINT=${{ secrets.GRAPHQL_ENDPOINT_ARG }} --build-arg ARG_BUILD_VERSION=${{ steps.prep.outputs.version }} --build-arg ARG_BUILD_REVISION=${{ github.sha }} --build-arg ARG_BUILD_DATE=${{ steps.prep.outputs.created }} -f Dockerfile . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-web:${{ github.sha }} -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-web:latest
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-web:${{ github.sha }}
- uses: Azure/[email protected]
with:
cluster-name: ${{ secrets.CLUSTER_NAME }}
resource-group: ${{ secrets.RESOURCE_GROUP_K8S }}
- uses: Azure/[email protected]
with:
container-registry-url: ${{ secrets.REGISTRY_LOGIN_SERVER }}
container-registry-username: ${{ secrets.REGISTRY_USERNAME }}
container-registry-password: ${{ secrets.REGISTRY_PASSWORD }}
secret-name: alkemio-web-secret
- uses: Azure/[email protected]
with:
manifests: |
manifests/25-web-deployment-dev.yaml
manifests/30-web-service.yaml
images: |
${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-web:${{ github.sha }}
imagepullsecrets: |
alkemio-web-secret