-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (36 loc) · 1.33 KB
/
maven.yml
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
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI (Maven) and CNAB bundle package and publish
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11.0.6
uses: actions/setup-java@v1
with:
java-version: 11.0.6
- name: Build with Maven
run: |
mvn -B package --file pom.xml
java -version
- name: Zip the function for CNAB bundle
run: |
pushd target/azure-functions/java-function; zip -r ../../../zip.zip .; popd
- name: CNAB Bundle with porter
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
run: |
echo "Installing Porter and Porter mixins to build and publish."
echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin
curl https://deislabs.blob.core.windows.net/porter/canary/install-linux.sh | bash
PATH=$PATH:~/.porter
porter mixins install jq --url https://github.com/squillace/porter-jq/releases/download --version v0.1.0
porter build
porter publish