Skip to content

Commit

Permalink
Update Github Actions (#410)
Browse files Browse the repository at this point in the history
Workflows actions are using some deprecated versions, and they also are not using pinned SHA versions.

let's replace the following:

actions/checkout@v1 -> actions/checkout@b4ffde6 (v4.1.1)
actions/setup-java@v1 -> actions/setup-java@99b8673 (v4.2.1)

note: when needing java 13 for setup-java, 'adopt' distribution is used because 'temurin' distribution does not support java 13.
  • Loading branch information
pderop committed Apr 18, 2024
1 parent f741562 commit 671f7db
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
java-version: 13
java-version: '13'
distribution: 'adopt'
- name: Run tests and javadoc
run: ./gradlew check javadoc
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ jobs:
runs-on: ubuntu-20.04
environment: release
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
java-version: 8
java-version: '8'
distribution: 'temurin'
- name: Publish Release
if: endsWith(github.event.release.tag_name, '.RELEASE')
run: ./gradlew --no-daemon -Pversion="${{github.event.release.tag_name}}" sign publish
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ jobs:
checkSnapshot:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
java-version: 13 # Modern JVM is needed for Java 10+ specific tests
java-version: '13' # Modern JVM is needed for Java 10+ specific tests
distribution: 'adopt'
- name: Run tests and javadoc
run: ./gradlew check javadoc
publishSnapshot:
Expand All @@ -28,11 +29,12 @@ jobs:
run: |
echo "::error ::$BLOCKHOUND_VERSION is not following the x.y.z.BUILD-SNAPSHOT format"
exit 1
- uses: actions/checkout@v1
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
java-version: 8
java-version: '8'
distribution: 'temurin'
- name: Publish Snapshot
run: ./gradlew --no-daemon -Pversion=$BLOCKHOUND_VERSION publish
env:
Expand Down

0 comments on commit 671f7db

Please sign in to comment.