Skip to content

Commit

Permalink
giving up on maven workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dkontyko committed Sep 24, 2023
1 parent e4c4e1a commit 02897b4
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions .github/workflows/main_restpdfformfiller(dev).yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,44 @@ on:
env:
AZURE_FUNCTIONAPP_NAME: restpdfformfiller # set this to your function app name on Azure
PACKAGE_DIRECTORY: 'FunctionApp' # set this to the directory which contains pom.xml file
JAVA_VERSION: '17' # set this to the java version to use

jobs:
changes:
uses: ./.github/workflows/filter-changes.yml

build:
deploy-and-submit-dependencies:
needs: changes
if: ${{ github.event_name == 'workflow_dispatch' || needs.changes.outputs.function-app == 'true' }}
uses: ./.github/workflows/maven.yml

deploy-and-submit-dependencies:
needs: build
if: ${{ success() }}
runs-on: windows-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
- name: Setup Java Sdk ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v3
with:
name: RestPdfFormFiller-0.1.0.jar
path: target/RestPdfFormFiller-0.1.0.jar
distribution: 'microsoft'
java-version: ${{ env.JAVA_VERSION }}
cache: maven

- name: 'Restore Project Dependencies Using Mvn'
shell: pwsh # For Linux, use 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: 'restpdfformfiller'
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
slot-name: 'dev'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_2809551214454B81BB4D28673CCAEE70 }}
package: './target/RestPdfFormFiller-0.1.0.jar'
package: ${{ env.PACKAGE_DIRECTORY }}
respect-pom-xml: true

# Generate GitHub Maven Dependency Tree
# https://github.com/marketplace/actions/maven-dependency-tree-dependency-submission
- name: Submit Dependency Snapshot
uses: advanced-security/maven-dependency-submission-action@v3
with:
directory: './FunctionApp'
directory: './${{ env.PACKAGE_DIRECTORY }}'

0 comments on commit 02897b4

Please sign in to comment.