Skip to content

Fix docker build path #31

Fix docker build path

Fix docker build path #31

Workflow file for this run

name: Build and deploy
on:
push:
branches:
- nginx-gateway
- main
- ci
# permissions:
# id-token: write
# contents: read
env:
AZURE_CORE_OUTPUT: none
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: Azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
#creds: '{"clientId":"${{ secrets.CLIENT_ID }}","clientSecret":"${{ secrets.CLIENT_SECRET }}","subscriptionId":"${{ secrets.SUBSCRIPTION_ID }}","tenantId":"${{ secrets.TENANT_ID }}"}'
- name: Docker login to ACR
run: az acr login --name ${{ secrets.REGISTRY_NAME }}
- name: Build and push image
run: |
docker build -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/kiltiskamera/backend:${{ github.sha }} app
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/kiltiskamera/backend:${{ github.sha }}
- name: Deploy from ACR
uses: azure/webapps-deploy@v2
with:
#publish-profile: ${{ secrets.PUBLISH_PROFILE }}
app-name: 'kiltiskamera'
images: ${{ secrets.REGISTRY_LOGIN_SERVER }}/kiltiskamera/backend:${{ github.sha }}
- name: Azure logout
run: |
az logout
#deploy:
# runs-on: ubuntu-latest
# needs: build
# steps:
# - uses: actions/checkout@v4
# - name: Log in to Azure
# uses: Azure/login@v1
# with:
# client-id: ${{ secrets.CLIENT_ID }}
# tenant-id: ${{ secrets.TENANT_ID }}
# subscription-id: ${{ secrets.SUBSCRIPTION_ID }}
# # allow-no-subscriptions: true
#