Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve GH actions #324

Merged
merged 2 commits into from Mar 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/mavenLicenseCheck.yml
Expand Up @@ -38,7 +38,7 @@ on:
description: 'The version of Maven set up to run the license-check build'
type: string
required: false
default: '3.9.2'
default: '3.9.6'
secrets:
gitlabAPIToken:
description: 'The authentication token (scope: api) from gitlab.eclipse.org of the calling repository. Only required if license vetting is requested'
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:

- name: Process license-vetting request
if: env.request-review && (!env.isDependabotPR)
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const payload = await github.rest.repos.getCollaboratorPermissionLevel({
Expand All @@ -89,23 +89,23 @@ jobs:
# and for events triggered by PR creation/updates the ref is 'refs/pull/<PR-number>/merge'.
# So by default only the master-branch would be considered when requesting license-reviews, but we want the PR's state.
# Unless the PR is closed, then we want the master-branch, which allows subsequent license review requests.
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# use default ref 'refs/pull/<PR-number>/merge' for PR-events and 'refs/heads/master' for comments if the PR is closed
if: github.event.issue.pull_request == '' || github.event.issue.state != 'open'
with:
submodules: ${{ inputs.submodules }}
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: 'refs/pull/${{ github.event.issue.number }}/merge'
submodules: ${{ inputs.submodules }}
if: github.event.issue.pull_request != '' && github.event.issue.state == 'open'

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Cache local Maven repository
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.m2/repository
# re-cache on changes in the pom and target files
Expand All @@ -114,7 +114,7 @@ jobs:
${{ runner.os }}-maven-

- name: Set up Maven
uses: stCarolas/setup-maven@v4.5
uses: stCarolas/setup-maven@v5
with:
maven-version: ${{ inputs.mavenVersion }}

Expand All @@ -133,7 +133,7 @@ jobs:

- name: Process license check results
if: env.request-review
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const fs = require('fs')
Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:
issue_number: context.issue.number, ...context.repo, body: commentBody
})

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always() && env.request-review
with:
name: '${{ inputs.projectId }}-license-vetting-summary'
Expand Down