Create codeql.yml #14
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
# 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 - primechecker | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
AZURE_FUNCTIONAPP_NAME: primechecker # set this to your function app name on Azure | |
PACKAGE_DIRECTORY: '.' # set this to the directory which contains pom.xml file | |
JAVA_VERSION: '17' # set this to the java version to use | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
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: bash | |
run: | | |
pushd './${{ env.PACKAGE_DIRECTORY }}' | |
mvn clean package | |
popd | |
- name: 'Run Azure Functions Action' | |
uses: Azure/functions-action@v1 | |
id: fa | |
with: | |
app-name: 'primechecker' | |
slot-name: 'Production' | |
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_FB1881EE8A4C49E1B5CDBAB1767BA169 }} | |
package: '${{ env.PACKAGE_DIRECTORY }}' | |
respect-pom-xml: true |