Bump ty from 0.0.61 to 0.0.63 (#189) #183
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy to Azure | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write | |
| contents: read | |
| concurrency: | |
| group: deploy | |
| cancel-in-progress: true | |
| jobs: | |
| test-container: | |
| uses: ./.github/workflows/test-container.yml | |
| build-and-push: | |
| needs: test-container | |
| environment: azure | |
| runs-on: ubuntu-latest | |
| env: | |
| REGISTRY: crenergyid.azurecr.io | |
| REGISTRY_NAME: crenergyid | |
| IMAGE_NAME: cofy-api | |
| TAG: dev | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Azure Login via OIDC | |
| uses: azure/login@v3 | |
| with: | |
| client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
| tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
| subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
| - name: Login to ACR | |
| run: az acr login --name ${{ env.REGISTRY_NAME }} | |
| - name: Build and Push | |
| run: | | |
| VERSION=$(date +%Y%m%d%H%M%S) | |
| IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| docker build \ | |
| --build-arg VERSION=${VERSION} \ | |
| -t ${IMAGE}:${VERSION} \ | |
| -t ${IMAGE}:${TAG} \ | |
| . | |
| docker push ${IMAGE}:${VERSION} | |
| docker push ${IMAGE}:${TAG} |