-
Notifications
You must be signed in to change notification settings - Fork 8
45 lines (37 loc) · 1.23 KB
/
submit-dependency-tree-samples.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
name: Submit Dependency Tree Samples
on:
push:
branches:
- main
paths:
- '**/pom.xml'
jobs:
submit-dependency-tree:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: '17'
- name: Determine Home Directory
id: find-home
run: |
echo "home=$HOME" >> $GITHUB_OUTPUT
- name: Cache Maven Local Repo
uses: actions/cache@v3
with:
path: ${{ steps.find-home.outputs.home }}/.m2/repository
key: ${{ runner.os }}-${{ runner.arch }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-maven-
- name: Set Up Maven Repo Filters
run: |
mkdir -p ${{ steps.find-home.outputs.home }}/.m2/repository/.remoteRepositoryFilters/
cp -av ${{ github.workspace }}/.mvn/filters/*.txt ${{ steps.find-home.outputs.home }}/.m2/repository/.remoteRepositoryFilters/
- name: Submit Dependency Snapshot
uses: advanced-security/maven-dependency-submission-action@v3