-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (62 loc) · 3.11 KB
/
example.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: authenticate-project-bom
on:
push:
branches: [main]
jobs:
authenticate-java-project-with-bom:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up JDK 16
uses: actions/setup-java@v2
with:
java-version: '16'
distribution: 'adopt'
- name: Compile project using Maven
run: mvn --batch-mode --update-snapshots compile
- name: Authenticate Java Maven project with BoM
#--> Run the GitHub action
# This 'env' block is necessary because github actions will try to pass the current variables for JAVA_HOME and JDK_HOME to the container
# only include this if your workflow uses the 'setup-java' actions or sets those environment varialbes (JAVA_HOME, PATH)
env:
JAVA_HOME: /usr/local/openjdk-17
PATH: /usr/local/openjdk-17/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# uses: codenotary/vcn-authenticate-bom-java-github-action@v1.0.0
uses: codenotary/vcn-authenticate-bom-java-github-action@main
with:
asset: git://.
cnil_host: ${{ secrets.CNIL_HOST }}
cnil_grpc_port: ${{ secrets.CNIL_GRPC_PORT }}
cnil_api_key: ${{ secrets.CNIL_API_KEY }}
# the signer ID is always required (even if it's the same as the one of the CNIL API key)
# - hardcode it here
signer_id: OggVCNAPIKey1
#<--
#--> or run the vcn Docker image directly (all vcn flags are available and passed through)
# uses: docker://codenotary/vcn:bom-maven
# with:
# args: n git://. --lc-host ${{ secrets.CNIL_HOST }} --lc-port ${{ secrets.CNIL_GRPC_PORT }} --lc-api-key ${{ secrets.CNIL_API_KEY }} --bom
#<--
- name: Build JAR using Maven
run: mvn --batch-mode --update-snapshots verify
- name: Authenticate JAR with BoM
#--> Run the GitHub action
# uses: codenotary/vcn-authenticate-bom-java-github-action@v1.0.0
# This 'env' block is necessary because github actions will try to pass the current variables for JAVA_HOME and JDK_HOME to the container
# only include this if your workflow uses the 'setup-java' actions or sets those environment varialbes (JAVA_HOME, PATH)
env:
JAVA_HOME: /usr/local/openjdk-17
PATH: /usr/local/openjdk-17/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
uses: codenotary/vcn-authenticate-bom-java-github-action@main
with:
asset: target/codenotary-hello-world-maven-0.1.0.jar
cnil_host: ${{ secrets.CNIL_HOST }}
cnil_grpc_port: ${{ secrets.CNIL_GRPC_PORT }}
cnil_api_key: ${{ secrets.CNIL_API_KEY }}
#<--
#--> or run the vcn Docker image directly (all vcn flags are available and passed through)
# uses: docker://codenotary/vcn:bom-maven
# with:
# args: n target/codenotary-hello-world-maven-0.1.0.jar --lc-host ${{ secrets.CNIL_HOST }} --lc-port ${{ secrets.CNIL_GRPC_PORT }} --lc-api-key ${{ secrets.CNIL_API_KEY }} --bom
#<--