Skip to content

Commit

Permalink
Add or update the Azure App Service build and deployment workflow config
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasbunyan committed Apr 10, 2024
1 parent e67e81b commit 59b0dd8
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/main_tbapachefop(staging).yml
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

0 comments on commit 59b0dd8

Please sign in to comment.