Skip to content

Create main.yml

Create main.yml #1

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
jobs:
steps:
runs-on: ubuntu-latest
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@main
- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: 'Build and push image'
uses: azure/docker-login@v1
with:
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- run: |
docker build . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/black-wasm:${{ github.sha }}
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/black-wasm:${{ github.sha }}