upgrade GHA jobs to use node 20 and add dependabot for GHA auto-updates

This commit is contained in:
Madhavan Sridharan 2024-02-09 17:08:59 -05:00
parent 4552ec7844
commit 06e6c3a530
4 changed files with 30 additions and 17 deletions

13
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,13 @@
# Set update schedule for GitHub Actions
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "monthly"

View File

@ -26,7 +26,7 @@ jobs:
java-version: '21' java-version: '21'
- name: Cache Maven packages - name: Cache Maven packages
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: ~/.m2 path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}

View File

@ -22,10 +22,10 @@ jobs:
steps: steps:
- name: checkout repo - name: checkout repo
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:
distribution: 'oracle' distribution: 'oracle'
java-version: '21' java-version: '21'
@ -47,7 +47,7 @@ jobs:
df -h df -h
- name: Cache Maven packages - name: Cache Maven packages
uses: actions/cache@v3.2.3 uses: actions/cache@v4
with: with:
path: ~/.m2 path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
@ -70,16 +70,16 @@ jobs:
mvn clean verify -Drevision="${{ env.PREVIEW_VERSION }}" mvn clean verify -Drevision="${{ env.PREVIEW_VERSION }}"
- name: Setup docker buildx - name: Setup docker buildx
uses: docker/setup-buildx-action@v2.2.1 uses: docker/setup-buildx-action@v3
- name: docker hub login - name: docker hub login
uses: docker/login-action@v2.1.0 uses: docker/login-action@v3
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- name: docker test build - name: docker test build
uses: docker/build-push-action@v3.3.0 uses: docker/build-push-action@v5
with: with:
context: . context: .
file: Dockerfile file: Dockerfile

View File

@ -19,10 +19,10 @@ jobs:
steps: steps:
- name: checkout repo - name: checkout repo
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:
distribution: 'oracle' distribution: 'oracle'
java-version: '21' java-version: '21'
@ -44,7 +44,7 @@ jobs:
df -h df -h
- name: Cache Maven packages - name: Cache Maven packages
uses: actions/cache@v3.2.3 uses: actions/cache@v4
with: with:
path: ~/.m2 path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
@ -65,10 +65,10 @@ jobs:
mvn clean package -Drevision="${{ env.RELEASE_VERSION }}" -P enable-container-tests mvn clean package -Drevision="${{ env.RELEASE_VERSION }}" -P enable-container-tests
- name: Setup docker buildx - name: Setup docker buildx
uses: docker/setup-buildx-action@v2.2.1 uses: docker/setup-buildx-action@v3
- name: docker hub login - name: docker hub login
uses: docker/login-action@v2.1.0 uses: docker/login-action@v3
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
@ -95,7 +95,7 @@ jobs:
cp nb5/target/nb5.jar nb5/target/nb5 staging cp nb5/target/nb5.jar nb5/target/nb5 staging
- name: upload artifacts - name: upload artifacts
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v4
with: with:
name: binaries name: binaries
path: staging path: staging
@ -105,7 +105,7 @@ jobs:
# continue-on-error: false # continue-on-error: false
# #
# - name: upload javadoc # - name: upload javadoc
# uses: actions/upload-artifact@v3 # uses: actions/upload-artifact@v4
# with: # with:
# name: javadoc # name: javadoc
# path: target/nosqlbench-*-javadoc.jar # path: target/nosqlbench-*-javadoc.jar
@ -115,7 +115,7 @@ jobs:
scripts/bump-minor-version scripts/bump-minor-version
- name: docker push to hub - name: docker push to hub
uses: docker/build-push-action@v3.3.0 uses: docker/build-push-action@v5
with: with:
context: . context: .
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
@ -178,7 +178,7 @@ jobs:
- name: Archive Test Results - name: Archive Test Results
if: always() if: always()
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: test-results name: test-results
path: | path: |
@ -193,7 +193,7 @@ jobs:
# - name: set git email # - name: set git email
# run: git config --global user.name "${{ secrets.NBDROID_NAME }}" # run: git config --global user.name "${{ secrets.NBDROID_NAME }}"
# - name: download javadocs # - name: download javadocs
# uses: actions/download-artifact@v3 # uses: actions/download-artifact@v4
# with: # with:
# name: javadoc # name: javadoc
# - run: ls -la # - run: ls -la