-
Notifications
You must be signed in to change notification settings - Fork 22
65 lines (50 loc) · 2 KB
/
build-docker-container.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# This workflow builds a Docker container and deploys it to the TypeAgent container repository
name: Build and deploy Node.js app to Azure Web App - typeagent
on:
push:
branches:
- main
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.
steps:
- name: Setup Git LF
run: |
git config --global core.autocrlf false
- uses: actions/checkout@v4
with:
ref: main
- 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
- run: az acr build -t typeagent:latest -r typeagentContainerRegistry --file ${{ github.workspace }}/ts/Dockerfile --subscription b64471de-f2ac-4075-a3cb-7656bca768d0 ${{ github.workspace }}/ts