Skip to content

Publish Hockeybot Image #1

Publish Hockeybot Image

Publish Hockeybot Image #1

on:
workflow_dispatch:
inputs:
environment:
type: environment
required: true
name: Publish Hockeybot Image
permissions:
contents: "read"
id-token: "write"
jobs:
build-and-deploy:
environment: ${{ inputs.environment }}
runs-on: ubuntu-latest
steps:
- name: "Checkout Source"
uses: actions/checkout@main
- name: "Az CLI login"
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Login to ACR and deploy
run: |
base=$(echo "hockeybot/${{inputs.environment}}" | tr '[:upper:]' '[:lower:]')
env=$(echo "${{inputs.environment}}" | tr '[:upper:]' '[:lower:]')
az acr login --name bpidocker
az acr build -t $base:latest -t ${{ github.sha }} -r bpidocker