Skip to content

Commit

Permalink
Update GH actions used in the shared one
Browse files Browse the repository at this point in the history
Every usage prints ```
call-license-check / check-licenses
Node.js 16 actions are deprecated. Please update the following actions
to use Node.js 20: actions/checkout@v3, actions/setup-java@v3,
actions/cache@v3, stCarolas/setup-maven@v4.5. For more information see:
https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
```
Let's try to be more user friendly.
  • Loading branch information
akurtakov authored and HannesWell committed Mar 11, 2024
1 parent 98b8126 commit 6a691f2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/mavenLicenseCheck.yml
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

0 comments on commit 6a691f2

Please sign in to comment.