Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .github/workflows/checkDependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,39 +73,54 @@ jobs:
max-parallel: 1
fail-fast: false
steps:
- name: List number of open PRs
id: list-prs
run: |
json_output=$(gh pr list -l 'dependency-check' -R $OWNER/$REPO -L 20 --json id)
echo "prs=$json_output" | tee -a "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ secrets.token }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
if: ${{ fromJson(steps.list-prs.outputs.prs)[9] == null }}
with:
fetch-depth: 0
ref: master
- name: Set up Maven
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5
if: ${{ fromJson(steps.list-prs.outputs.prs)[9] == null }}
with:
maven-version: ${{ inputs.mavenVersion }}
- name: Set up JDK
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
if: ${{ fromJson(steps.list-prs.outputs.prs)[9] == null }}
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Check ${{ matrix.bundles }}
working-directory: ${{ matrix.bundles }}
working-directory: ${{ matrix.bundles }}
if: ${{ fromJson(steps.list-prs.outputs.prs)[9] == null }}
run: >-
mvn -B -ntp ${{ inputs.maven-goals }} -DskipTests -Pdependency-check -Dtycho.dependency.check.apply=true
- name: Create PR description file if missing
if: ${{ hashFiles(format('{0}/target/versionProblems.md', matrix.bundles)) == '' }}
if: ${{ hashFiles(format('{0}/target/versionProblems.md', matrix.bundles)) == '' && fromJson(steps.list-prs.outputs.prs)[9] == null }}
working-directory: ${{ matrix.bundles }}
run: |
mkdir -p target
echo '## No version problems detected' > target/versionProblems.md
- name: Create Pull Request
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
if: ${{ fromJson(steps.list-prs.outputs.prs)[9] == null }}
with:
commit-message: Update version ranges of dependencies for ${{ matrix.bundles }}
branch: dependency-check/${{ matrix.bundles }}
title: Update version ranges of dependencies for ${{ matrix.bundles }}
body-path: ${{ matrix.bundles }}/target/versionProblems.md
delete-branch: true
draft: false
labels: dependency-check
token: ${{ secrets.token }}
committer: ${{ inputs.author }}
author: ${{ inputs.author }}
Expand Down
Loading