Workflow file for this run
This file contains 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
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy | |
# More GitHub Actions for Azure: https://github.com/Azure/actions | |
name: Build and deploy Node.js app to Azure Web App - typeagent | |
on: | |
push: | |
branches: | |
- dev/robgruen/android_sans_MSAL | |
workflow_dispatch: | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest # pnpm deploy does not work currently on Windows. Fails with EPERM. | |
# needs: build_ts | |
# environment: | |
# name: 'test' | |
# url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} | |
# permissions: | |
# id-token: write #This is required for requesting the JWT | |
steps: | |
- name: Setup Git LF | |
run: | | |
git config --global core.autocrlf false | |
- uses: actions/checkout@v4 | |
with: | |
ref: dev/robgruen/android_sans_MSAL | |
- uses: 1arp/[email protected] | |
with: | |
path: ${{ github.workspace }}/ts/ | |
isAbsolutePath: true | |
file: .env | |
content: ${{ secrets.DOCKER_DOT_ENV }} | |
# - uses: finnp/create-file-action@master | |
# env: | |
# FILE_NAME: ${{ github.workspace }}/ts/.env | |
# FILE_DATA: | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
ts: | |
- "ts/**" | |
- ".github/workflows/build-ts.yml" | |
- uses: pnpm/action-setup@v4 | |
if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }} | |
name: Install pnpm | |
with: | |
version: 9 | |
run_install: false | |
- uses: actions/setup-node@v4 | |
if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }} | |
with: | |
node-version: ${{ matrix.version }} | |
#cache: "pnpm" | |
#cache-dependency-path: ts/pnpm-lock.yaml | |
- name: Login to Azure | |
uses: azure/[email protected] | |
with: | |
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_5B0D2D6BA40F4710B45721D2112356DD }} | |
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_39BB903136F14B6EAD8F53A8AB78E3AA }} | |
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_F36C1F2C4B2C49CA8DD5C52FAB98FA30 }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
# - name: Build Docker image(s) | |
# # You may pin to the exact commit or the version. | |
# # uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 | |
# uses: docker/[email protected] | |
# with: | |
# context: . | |
# file: ts/Dockerfile | |
# push: false | |
# tags: typeagent:latest | |
#- run: az login | |
#- run: az acr login --name typeageintcontainerregistry | |
#- run: az account show | |
#- run: az account set --subscription b64471de-f2ac-4075-a3cb-7656bca768d0 | |
#- run: az account list | |
#- run: az resource list --name typeagentContainerRegistry | |
#- run: ls ${{ github.workspace }} -l | |
- run: ls ${{ github.workspace }}/ts -al | |
- run: az acr build -t typeagent:latest -r typeagentContainerRegistry --file ${{ github.workspace }}/ts/Dockerfile --subscription b64471de-f2ac-4075-a3cb-7656bca768d0 ${{ github.workspace }}/ts | |