-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathmaster_hz-lin-consumption-java-11.yml
More file actions
43 lines (37 loc) · 1.33 KB
/
master_hz-lin-consumption-java-11.yml
File metadata and controls
43 lines (37 loc) · 1.33 KB
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
# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: Build and deploy Java project to Azure Function App - hz-lin-consumption-java-11
on:
push:
branches:
- master
workflow_dispatch:
env:
AZURE_FUNCTIONAPP_NAME: hz-lin-consumption-java-11 # set this to your function app name on Azure
PACKAGE_DIRECTORY: '.' # set this to the directory which contains pom.xml file
JAVA_VERSION: '11' # set this to the java version to use
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@v2
- name: Setup Java Sdk ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v1
with:
java-version: ${{ env.JAVA_VERSION }}
- name: 'Restore Project Dependencies Using Mvn'
shell: pwsh
run: |
pushd './${{ env.PACKAGE_DIRECTORY }}'
mvn clean package
popd
- name: 'Run Azure Functions Action'
uses: Azure/functions-action@v1
id: fa
with:
app-name: 'hz-lin-consumption-java-11'
slot-name: 'production'
publish-profile: ${{ secrets.AzureAppService_PublishProfile_4fd850aaea904877b3f092eeb4f1edf9 }}
package: '${{ env.PACKAGE_DIRECTORY }}'
respect-pom-xml: true