|
1 |
| -# This workflow will build and push a node.js application to an Azure Web App when a release is created. |
2 |
| -# |
3 |
| -# This workflow assumes you have already created the target Azure App Service web app. |
4 |
| -# For instructions see https://docs.microsoft.com/azure/app-service/app-service-plan-manage#create-an-app-service-plan |
5 |
| -# |
6 |
| -# To configure this workflow: |
7 |
| -# |
8 |
| -# 1. Set up a secret in your repository named AZURE_WEBAPP_PUBLISH_PROFILE with the value of your Azure publish profile. |
9 |
| -# For instructions on obtaining the publish profile see: https://docs.microsoft.com/azure/app-service/deploy-github-actions#configure-the-github-secret |
10 |
| -# |
11 |
| -# 2. Change the values for the AZURE_WEBAPP_NAME, AZURE_WEBAPP_PACKAGE_PATH and NODE_VERSION environment variables (below). |
12 |
| -# |
13 |
| -# For more information on GitHub Actions for Azure, refer to https://github.com/Azure/Actions |
14 |
| -# For more samples to get started with GitHub Action workflows to deploy to Azure, refer to https://github.com/Azure/actions-workflow-samples |
15 | 1 | name: CD
|
16 | 2 |
|
17 | 3 | on:
|
18 | 4 | release:
|
19 | 5 | types: [created]
|
20 | 6 |
|
21 |
| -env: |
22 |
| - AZURE_WEBAPP_NAME: deserializerV2 # set this to your application's name |
23 |
| - AZURE_WEBAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root |
24 |
| - NODE_VERSION: '12.x' # set this to the node version to use |
25 |
| - |
26 | 7 | jobs:
|
27 | 8 | build-and-deploy:
|
28 | 9 | name: Build and Deploy
|
29 | 10 | runs-on: ubuntu-latest
|
30 | 11 | steps:
|
31 | 12 | - uses: actions/checkout@v2
|
32 |
| - - name: Use Node.js ${{ env.NODE_VERSION }} |
33 |
| - uses: actions/setup-node@v1 |
34 |
| - with: |
35 |
| - node-version: ${{ env.NODE_VERSION }} |
36 |
| - - name: npm install, build, and test |
37 |
| - run: | |
38 |
| - npm ci |
39 |
| - npm run build --if-present |
40 |
| - - name: 'Deploy to Azure WebApp' |
41 |
| - uses: azure/webapps-deploy@v2 |
| 13 | + - name: Build and push Docker images |
| 14 | + |
42 | 15 | with:
|
43 |
| - app-name: ${{ env.AZURE_WEBAPP_NAME }} |
44 |
| - publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} |
45 |
| - package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} |
| 16 | + # Username used to log in to a Docker registry. If not set then no login will occur |
| 17 | + username: huangtingluo |
| 18 | + password: ${{secrets.DOCKER_ACCESS_TOKEN}} |
| 19 | + repository: huangtingluo/binary-json-formatter |
| 20 | + tags: release |
0 commit comments