Merge branch 'main' into main #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |