Skip to content

Commit

Permalink
add action yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeWang1127 committed Nov 29, 2023
1 parent 09f3a0e commit 10c4243
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
27 changes: 27 additions & 0 deletions java-shared-dependencies/unmanaged-dependency-check/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Unmanaged dependency check"
description: "Validation for "
inputs:
bom-path:
description: "The relative path from the repository root to the pom.xml file"
required: true
runs:
using: "composite"
steps:
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
cache: maven
- name: Set up Maven
uses: stCarolas/setup-maven@v4.5
with:
maven-version: 3.8.2
- name: Install check
shell: bash
run: |
mvn clean install
- name: Run unmanaged dependency check
shell: bash
run: |
mvn exec:java -Dexec.args="3.18.0 ${{ inputs.bom-path}}"
21 changes: 21 additions & 0 deletions java-shared-dependencies/unmanaged-dependency-check/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,27 @@
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>com.google.cloud.UnmanagedDependencyCheck</mainClass>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>com.google.cloud.tools</groupId>
Expand Down

0 comments on commit 10c4243

Please sign in to comment.