Skip to content

Commit

Permalink
Updated github actions to latest versions and added the DV access key…
Browse files Browse the repository at this point in the history
… as env var
  • Loading branch information
ribafish committed Jul 31, 2024
1 parent 15c3a88 commit 10e6b88
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
10 changes: 7 additions & 3 deletions .github/actions/setup-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@ description: Installs required JDKs for building and testing
runs:
using: "composite"
steps:

- name: 'Set up JDK 8'
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 8

- name: Prepare JDK8 env var
shell: bash
run: echo "JDK8=$JAVA_HOME" >> $GITHUB_ENV
- name: 'Setup Gradle Build'
uses: gradle/gradle-build-action@v2

- name: 'Setup Gradle'
uses: gradle/actions/setup-gradle@v3

- name: Setup Git user
shell: bash
run: |
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
pull_request:
workflow_dispatch:

# https://stackoverflow.com/a/72408109/16358266
concurrency:
Expand All @@ -16,10 +17,13 @@ jobs:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4

- name: "Setup Build Environment"
uses: ./.github/actions/setup-environment

- name: "Verify"
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
run: "./gradlew build -s"

- name: "Store reports"
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/wrapper-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Set up Git config
env:
TOKEN: ${{ secrets.GH_BOT_GITHUB_TOKEN }}
run: |
git config --global url."https://bot-githubaction:${TOKEN}@github.com/".insteadOf "https://github.com/"
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4
with:
Expand All @@ -26,13 +28,17 @@ jobs:
git_user_signingkey: true
git_commit_gpgsign: true
git_config_global: true

- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- uses: gradle/gradle-build-action@v3
with:
arguments: clean upgradeGradleWrapperAll --no-build-cache

- name: 'Setup Gradle'
uses: gradle/actions/setup-gradle@v3

- name: 'Upgrade Gradle wrapper'
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
WRAPPER_UPGRADE_GIT_TOKEN: ${{ secrets.GH_BOT_GITHUB_TOKEN }}
run: ./gradlew clean upgradeGradleWrapperAll --no-build-cache

0 comments on commit 10e6b88

Please sign in to comment.