diff --git a/.github/workflows/api_deploy.yaml b/.github/workflows/api_deploy.yaml new file mode 100644 index 0000000..c5b9964 --- /dev/null +++ b/.github/workflows/api_deploy.yaml @@ -0,0 +1,36 @@ +name: Deploy +on: + workflow_call: + inputs: + app_name: + required: true + type: string + environment_name: + required: true + type: string + version_number: + required: true + type: string + +permissions: + id-token: write + contents: read + +jobs: + deploy: + runs-on: ubuntu-latest + environment: ${{ inputs.environment_name }} + steps: + - name: Log in to Azure + uses: azure/login@v2 + with: + client-id: ${{ vars.VITE_CLIENT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + tenant-id: ${{ vars.VITE_TENANT_ID }} + + - name: Azure CLI script + uses: azure/cli@v2 + with: + azcliversion: latest + inlineScript: | + az containerapp update --name ${{ inputs.app_name }}-${{ inputs.environment_name }} --resource-group noahspan-root --image docker.io/noahspan/${{ inputs.app_name }}:${{ inputs.version_number }}