Upgrade GHA dependencies (#15954)

* Upgrade actions/checkout from v3 to v4.

* Upgrade actions/setup-java from v3 to v4.

* Upgrade dorny/paths-filter, actions/cdache/restore, actions/stale to v3, v4 and v9 respectively.

* Add a GHA label for .github/** and skip UT/IT on .github files.

* remove skipping UT/IT on .github/** changes.
This commit is contained in:
Abhishek Radhakrishnan 2024-03-08 07:54:02 +05:30 committed by GitHub
parent 5f203725dd
commit daf03939a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 42 additions and 37 deletions

5
.github/labeler.yml vendored
View File

@ -89,3 +89,8 @@
- changed-files: - changed-files:
- any-glob-to-any-file: - any-glob-to-any-file:
- 'extensions-contrib/kubernetes-overlord-extensions/**' - 'extensions-contrib/kubernetes-overlord-extensions/**'
'GHA':
- changed-files:
- any-glob-to-any-file:
- '.github/**'

View File

@ -35,9 +35,9 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- uses: actions/setup-java@v3 - uses: actions/setup-java@v4
with: with:
distribution: 'zulu' distribution: 'zulu'
java-version: '8' java-version: '8'

View File

@ -32,17 +32,17 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout branch - name: Checkout branch
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: setup java - name: setup java
uses: actions/setup-java@v3 uses: actions/setup-java@v4
with: with:
java-version: '8' java-version: '8'
distribution: 'zulu' distribution: 'zulu'
- name: Cache Maven m2 repository - name: Cache Maven m2 repository
id: maven id: maven
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: ~/.m2/repository path: ~/.m2/repository
key: maven-${{ runner.os }}-8-${{ github.sha }} key: maven-${{ runner.os }}-8-${{ github.sha }}
@ -117,10 +117,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout branch - name: Checkout branch
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: setup java - name: setup java
uses: actions/setup-java@v3 uses: actions/setup-java@v4
with: with:
java-version: '8' java-version: '8'
distribution: 'zulu' distribution: 'zulu'

View File

@ -36,6 +36,6 @@ jobs:
docker-build: docker-build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Build the Docker image - name: Build the Docker image
run: DOCKER_BUILDKIT=1 docker build -t apache/druid:tag -f distribution/docker/Dockerfile . run: DOCKER_BUILDKIT=1 docker build -t apache/druid:tag -f distribution/docker/Dockerfile .

View File

@ -75,31 +75,31 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- name: Checkout branch - name: Checkout branch
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: setup java - name: setup java
uses: actions/setup-java@v3 uses: actions/setup-java@v4
with: with:
java-version: ${{ inputs.build_jdk }} java-version: ${{ inputs.build_jdk }}
distribution: 'zulu' distribution: 'zulu'
- name: Restore Maven repository - name: Restore Maven repository
id: maven-restore id: maven-restore
uses: actions/cache/restore@v3 uses: actions/cache/restore@v4
with: with:
path: ~/.m2/repository path: ~/.m2/repository
key: maven-${{ runner.os }}-${{ inputs.build_jdk }}-${{ github.sha }} key: maven-${{ runner.os }}-${{ inputs.build_jdk }}-${{ github.sha }}
- name: Restore targets - name: Restore targets
id: targets-restore id: targets-restore
uses: actions/cache/restore@v3 uses: actions/cache/restore@v4
with: with:
path: ./**/target path: ./**/target
key: maven-${{ runner.os }}-${{ inputs.build_jdk }}-targets-${{ github.sha }} key: maven-${{ runner.os }}-${{ inputs.build_jdk }}-targets-${{ github.sha }}
- name: Retrieve cached docker image - name: Retrieve cached docker image
id: docker-restore id: docker-restore
uses: actions/cache/restore@v3 uses: actions/cache/restore@v4
with: with:
key: druid-container-jdk${{ inputs.build_jdk }}.tar.gz-${{ github.sha }} key: druid-container-jdk${{ inputs.build_jdk }}.tar.gz-${{ github.sha }}
path: | path: |

View File

@ -60,17 +60,17 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- name: Checkout branch - name: Checkout branch
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: setup java - name: setup java
uses: actions/setup-java@v3 uses: actions/setup-java@v4
with: with:
java-version: ${{ inputs.runtime_jdk }} java-version: ${{ inputs.runtime_jdk }}
distribution: 'zulu' distribution: 'zulu'
- name: Restore Maven repository - name: Restore Maven repository
id: maven-restore id: maven-restore
uses: actions/cache/restore@v3 uses: actions/cache/restore@v4
with: with:
path: ~/.m2/repository path: ~/.m2/repository
key: maven-${{ runner.os }}-${{ inputs.build_jdk }}-${{ github.sha }} key: maven-${{ runner.os }}-${{ inputs.build_jdk }}-${{ github.sha }}

View File

@ -55,13 +55,13 @@ jobs:
coverage_failure: ${{ steps.set_outputs.outputs.coverage_failure }} coverage_failure: ${{ steps.set_outputs.outputs.coverage_failure }}
steps: steps:
- name: checkout branch - name: checkout branch
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
# skip the "cache: maven" step from setup-java. We explicitly use a # skip the "cache: maven" step from setup-java. We explicitly use a
# different cache key since we cannot reuse it across commits. # different cache key since we cannot reuse it across commits.
- uses: actions/setup-java@v3 - uses: actions/setup-java@v4
with: with:
distribution: 'zulu' distribution: 'zulu'
java-version: ${{ inputs.jdk }} java-version: ${{ inputs.jdk }}
@ -70,7 +70,7 @@ jobs:
# we include github.sha in the cache key to make it specific to that build/jdk # we include github.sha in the cache key to make it specific to that build/jdk
- name: Restore Maven repository - name: Restore Maven repository
id: maven-restore id: maven-restore
uses: actions/cache/restore@v3 uses: actions/cache/restore@v4
with: with:
path: ~/.m2/repository path: ~/.m2/repository
key: maven-${{ runner.os }}-${{ inputs.jdk }}-${{ github.sha }} key: maven-${{ runner.os }}-${{ inputs.jdk }}-${{ github.sha }}

View File

@ -33,7 +33,7 @@ jobs:
# the common extension in revised ITs is different from the one in standard ITs # the common extension in revised ITs is different from the one in standard ITs
common-extensions: ${{ steps.filter.outputs.common-extensions }} common-extensions: ${{ steps.filter.outputs.common-extensions }}
steps: steps:
- uses: dorny/paths-filter@v2 - uses: dorny/paths-filter@v3
if: github.event_name == 'pull_request' if: github.event_name == 'pull_request'
id: filter id: filter
with: with:

View File

@ -23,7 +23,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v8 - uses: actions/stale@v9
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: | stale-issue-message: |

View File

@ -32,7 +32,7 @@ jobs:
core: ${{ steps.filter.outputs.core || github.event_name != 'pull_request'}} core: ${{ steps.filter.outputs.core || github.event_name != 'pull_request'}}
common-extensions: ${{ steps.filter.outputs.common-extensions }} common-extensions: ${{ steps.filter.outputs.common-extensions }}
steps: steps:
- uses: dorny/paths-filter@v2 - uses: dorny/paths-filter@v3
if: github.event_name == 'pull_request' if: github.event_name == 'pull_request'
id: filter id: filter
with: with:
@ -148,10 +148,10 @@ jobs:
BUILD_DRUID_CLUSTER: true BUILD_DRUID_CLUSTER: true
steps: steps:
- name: Checkout branch - name: Checkout branch
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: setup java - name: setup java
uses: actions/setup-java@v3 uses: actions/setup-java@v4
with: with:
java-version: '8' java-version: '8'
distribution: 'zulu' distribution: 'zulu'
@ -160,7 +160,7 @@ jobs:
# we include github.sha in the cache key to make it specific to that build/jdk # we include github.sha in the cache key to make it specific to that build/jdk
- name: Restore Maven repository - name: Restore Maven repository
id: maven-restore id: maven-restore
uses: actions/cache/restore@v3 uses: actions/cache/restore@v4
with: with:
path: ~/.m2/repository path: ~/.m2/repository
key: maven-${{ runner.os }}-8-${{ github.sha }} key: maven-${{ runner.os }}-8-${{ github.sha }}

View File

@ -45,9 +45,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: checkout branch - name: checkout branch
uses: actions/checkout@v3 uses: actions/checkout@v4
- uses: actions/setup-java@v3 - uses: actions/setup-java@v4
with: with:
distribution: 'zulu' distribution: 'zulu'
java-version: ${{ matrix.java }} java-version: ${{ matrix.java }}
@ -118,9 +118,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: checkout branch - name: checkout branch
uses: actions/checkout@v3 uses: actions/checkout@v4
- uses: actions/setup-java@v3 - uses: actions/setup-java@v4
with: with:
distribution: 'zulu' distribution: 'zulu'
java-version: '8' java-version: '8'
@ -150,9 +150,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: checkout branch - name: checkout branch
uses: actions/checkout@v3 uses: actions/checkout@v4
- uses: actions/setup-java@v3 - uses: actions/setup-java@v4
with: with:
distribution: 'zulu' distribution: 'zulu'
java-version: '17' java-version: '17'

View File

@ -58,11 +58,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout branch - name: Checkout branch
uses: actions/checkout@v3 uses: actions/checkout@v4
# skip the "cache: maven" step from setup-java. We explicitly use a # skip the "cache: maven" step from setup-java. We explicitly use a
# different cache key since we cannot reuse it across commits. # different cache key since we cannot reuse it across commits.
- uses: actions/setup-java@v3 - uses: actions/setup-java@v4
with: with:
distribution: 'zulu' distribution: 'zulu'
java-version: ${{ matrix.jdk }} java-version: ${{ matrix.jdk }}
@ -71,7 +71,7 @@ jobs:
# we include github.sha in the cache key to make it specific to that build/jdk # we include github.sha in the cache key to make it specific to that build/jdk
- name: Cache Maven m2 repository - name: Cache Maven m2 repository
id: maven id: maven
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: ~/.m2/repository path: ~/.m2/repository
key: maven-${{ runner.os }}-${{ matrix.jdk }}-${{ github.sha }} key: maven-${{ runner.os }}-${{ matrix.jdk }}-${{ github.sha }}
@ -79,7 +79,7 @@ jobs:
- name: Cache targets - name: Cache targets
id: target id: target
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: | path: |
./**/target ./**/target
@ -87,7 +87,7 @@ jobs:
- name: Cache image - name: Cache image
id: docker_container id: docker_container
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
key: druid-container-jdk${{ matrix.jdk }}.tar.gz-${{ github.sha }} key: druid-container-jdk${{ matrix.jdk }}.tar.gz-${{ github.sha }}
path: | path: |

View File

@ -54,7 +54,7 @@ jobs:
# run everything if not a PR # run everything if not a PR
core: ${{ steps.filter.outputs.core || github.event_name != 'pull_request'}} core: ${{ steps.filter.outputs.core || github.event_name != 'pull_request'}}
steps: steps:
- uses: dorny/paths-filter@v2 - uses: dorny/paths-filter@v3
if: github.event_name == 'pull_request' if: github.event_name == 'pull_request'
id: filter id: filter
with: with: