Skip to content

Merge pull request #33 from gen-mind/develop #3

Merge pull request #33 from gen-mind/develop

Merge pull request #33 from gen-mind/develop #3

name: Build migration service
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# on:
# push:
# tags:
# - '*'
on:
push:
branches:
- main
env:
RGNAME: AKS_RG
ACRNAME: cognixacr
AKSNAME: Cognix_AKS
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to ACR
uses: docker/login-action@v3
with:
registry: ${{ env.ACRNAME }}.azurecr.io
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
- name: Migration Service Image Docker Build and Push
uses: docker/build-push-action@v2
with:
context: ./migration
file: ./migration/Dockerfile
platforms: linux/amd64
push: true
tags: |
${{ env.ACRNAME }}.azurecr.io/cognix/migrationservice:${{ github.ref_name }}
build-args: |
COGNIX_VERSION=${{ github.ref_name }}
# - name: Login to Azure
# uses: azure/login@v1
# with:
# creds: ${{ secrets.AZURE_CREDENTIALS }}
#
# - name: Get AKS kubeconfig
# run: az aks get-credentials --resource-group $RGNAME --name $AKSNAME
#
# - name: Deploy API server manifests
# run: |
# kubectl rollout restart deploy/apiservice