-
Notifications
You must be signed in to change notification settings - Fork 0
27 lines (24 loc) · 1.03 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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