Skip to content

Update main.yml azure/login #30

Update main.yml azure/login

Update main.yml azure/login #30

Workflow file for this run

on: [push]
name: xbee2mqtt_build_push_image
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
# checkout the repo
- name: 'Checkout GitHub Action'
uses: actions/checkout@main
- name: 'Login via Azure CLI'
uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: 'Build and push image'
uses: azure/docker-login@v2
with:
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- run: |
docker build . -f Dockerfile.xbee2mqtt -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/xbee2mqtt:${{ github.sha }}
docker build . -f Dockerfile.xbee2mqtt -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/xbee2mqtt:latest
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/xbee2mqtt:${{ github.sha }}
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/xbee2mqtt:latest