Skip to content

Build & Deploy to Sandbox on Azure #155

Build & Deploy to Sandbox on Azure

Build & Deploy to Sandbox on Azure #155

name: Build & Deploy to Sandbox on Azure
on:
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: 'Checkout github Action'
uses: actions/[email protected]
- 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]
with:
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- run: |
docker build -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: k8s-sandbox
resource-group: res-grp-k8s-sandbox
- 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/26-web-deployment-test.yaml
manifests/30-web-service.yaml
images: |
${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-web:${{ github.sha }}
imagepullsecrets: |
alkemio-web-secret