-
Notifications
You must be signed in to change notification settings - Fork 21
35 lines (31 loc) · 1.31 KB
/
check-dependencies.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
name: check-dependency-versions
on:
schedule:
- cron: '30 1 1,15 * *'
jobs:
check-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 13
- name: Finding dependency updates
run: mvn versions:display-dependency-updates -Dversions.outputFile=report.txt
- name: Update dependencies to latest version
run: mvn versions:use-latest-releases -DgenerateBackupPoms=true
- name: Checking if there was any updated dependency
id: update-check
run: (test -f pom.xml.versionsBackup && echo "::set-output name=updated::true") || echo "No version was updated"
- name: Execute tests
id: test-execution
run: (mvn clean test && echo "::set-output name=result::\"Dependencies can be updated\"") || (echo "::set-output name=failed::true" && echo "::set-output name=result::\"Can not update dependencies\"")
if: ${{ steps.update-check.updated }}
- name: Create Issue From File
if: ${{ steps.update-check.updated }}
uses: peter-evans/create-issue-from-file@v2
with:
title: ${{ steps.test-execution.outputs.result }}
content-filepath: ./report.txt
labels: dependencies, automation