Skip to content

Merge pull request #145 from SpokaneTech/joeriddles/fix-prod-deployment #21

Merge pull request #145 from SpokaneTech/joeriddles/fix-prod-deployment

Merge pull request #145 from SpokaneTech/joeriddles/fix-prod-deployment #21

Workflow file for this run

name: Deploy spokanetech container to azure
on:
push:
branches:
[ main ]
paths:
- '**'
- '.github/workflows/deploy_azure.yml'
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
id-token: write #This is required for requesting the OIDC JWT Token
contents: read #Required when GH token is used to authenticate with private repo
steps:
- name: Checkout to the branch
uses: actions/checkout@v2
- name: Azure Login
uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Build and push image to Azure CR
uses: azure/docker-login@v2
with:
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- run: |
docker build . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/spokanetech:latest
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/spokanetech:latest