Skip to content

Add workflow to release to main #2

Add workflow to release to main

Add workflow to release to main #2

Workflow file for this run

name: Relase to main
on:
workflow_dispatch:
pull_request:
branches:
- dev
permissions:
id-token: write
contents: read
jobs:
release:
runs-on: ubuntu-latest
environment: build
steps:
- uses: actions/checkout@v4
- name: 'Az CLI login'
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Retag images
run: |
az acr login -n ${{ secrets.ACR_NAME }}
for service in api-orchestrator worker cache; do
export SERVICE_TAG=${{ secrets.ACR_NAME }}.azurecr.io/unlisted/farmai/terravibes/$service
export DEV_TAG=$SERVICE_TAG:dev
export MAIN_TAG=$SERVICE_TAG:${{ github.run_id }}
# az acr import --name ${{ secrets.ACR_NAME }} --source $DEV_TAG --image $MAIN_TAG --force
echo Retagging from $DEV_TAG to $MAIN_TAG
done