forked from cajuncoding/ApacheFOP.Serverless
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add or update the Azure App Service build and deployment workflow config
- Loading branch information
1 parent
e67e81b
commit 59b0dd8
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# 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 - tbapachefop | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
env: | ||
AZURE_FUNCTIONAPP_NAME: tbapachefop # 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: windows-latest | ||
permissions: | ||
id-token: write #This is required for requesting the JWT | ||
|
||
steps: | ||
- name: 'Checkout GitHub Action' | ||
uses: actions/checkout@v4 | ||
|
||
- 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: Login to Azure | ||
uses: azure/login@v1 | ||
with: | ||
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_9674DC3E1D104C88975E845D327F6417 }} | ||
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_202A0E757ED6477EB3FAAAB9E05DEE55 }} | ||
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_E3BDFC0A5403499B89C1800AE18880AD }} | ||
|
||
- name: 'Run Azure Functions Action' | ||
uses: Azure/functions-action@v1 | ||
id: fa | ||
with: | ||
app-name: 'tbapachefop' | ||
slot-name: 'Staging' | ||
package: '${{ env.PACKAGE_DIRECTORY }}' | ||
respect-pom-xml: true | ||
|