Skip to content

Commit 94bcd9e

Browse files
authored
Updates GitHub actions (#345)
* Update GitHub accction veersions to support latest Node v24 runner. Update configuration. Update deprecated state transfer syntax * Update SBT to 1.10.11 project-wide
1 parent 527a28d commit 94bcd9e

5 files changed

Lines changed: 36 additions & 38 deletions

File tree

.github/workflows/dependency-graph.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,19 @@ jobs:
1010
update-graph:
1111
name: Update Dependency Graph
1212
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
1315
steps:
14-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v6
1517
- name: Set up JDK
16-
uses: actions/setup-java@v4
18+
uses: actions/setup-java@v5
1719
with:
1820
java-version: 11
1921
distribution: 'corretto'
2022
cache: sbt
2123
- uses: sbt/setup-sbt@v1
2224
with:
23-
sbt-runner-version: 1.9.9
25+
sbt-runner-version: 1.10.11
2426
- uses: scalacenter/sbt-dependency-submission@v3
2527
with:
2628
## Optional: Define the working directory of your build.

.github/workflows/lacework.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ jobs:
1212
scan:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v6
1616
- name: Set up JDK 11
17-
uses: actions/setup-java@v4
17+
uses: actions/setup-java@v5
1818
with:
1919
java-version: 11
2020
distribution: 'corretto'
2121

2222
- name: Get current version
2323
id: ver
24-
run: echo "::set-output name=tag::${GITHUB_REF#refs/tags/}"
24+
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
2525

2626
- name: Install lacework scanner
2727
run: |

.github/workflows/release.yml

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,16 @@ jobs:
1616
if: startsWith(github.ref, 'refs/tags/')
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v6
2020
- name: Set up JDK
21-
uses: actions/setup-java@v4
21+
uses: actions/setup-java@v5
2222
with:
2323
java-version: 11
2424
distribution: 'corretto'
2525
cache: sbt
26-
- name: Install sbt
27-
run: |
28-
echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | sudo tee /etc/apt/sources.list.d/sbt.list
29-
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x99e82a75642ac823" | sudo apt-key add
30-
sudo apt-get update
31-
sudo apt-get install sbt
32-
26+
- uses: sbt/setup-sbt@v1
27+
with:
28+
sbt-runner-version: 1.10.11
3329
- name: Verify sbt installation
3430
run: sbt --version
3531
- name: Get current version
@@ -43,7 +39,7 @@ jobs:
4339
"project nsq; set assembly / test := {}; assembly" \
4440
"project pubsub; set assembly / test := {}; assembly"
4541
- name: Create GitHub release and attach artifacts
46-
uses: softprops/action-gh-release@v1
42+
uses: softprops/action-gh-release@v2
4743
with:
4844
draft: true
4945
prerelease: ${{ contains(steps.ver.outputs.project_version, 'rc') }}
@@ -73,24 +69,24 @@ jobs:
7369
include:
7470
- suffix: ""
7571
steps:
76-
- uses: actions/checkout@v4
72+
- uses: actions/checkout@v6
7773
if: startsWith(github.ref, 'refs/tags/')
7874
- name: Checkout with history for version info
79-
uses: actions/checkout@v4
75+
uses: actions/checkout@v6
8076
if: startsWith(github.ref, 'refs/heads/snapshot')
8177
with:
8278
fetch-depth: 0
8379

8480
- name: Set up JDK
85-
uses: actions/setup-java@v4
81+
uses: actions/setup-java@v5
8682
with:
8783
java-version: 11
8884
distribution: 'corretto'
8985
cache: sbt
9086

9187
- uses: sbt/setup-sbt@v1
9288
with:
93-
sbt-runner-version: 1.9.9
89+
sbt-runner-version: 1.10.11
9490

9591
- name: Get current version
9692
if: startsWith(github.ref, 'refs/tags/')
@@ -102,25 +98,25 @@ jobs:
10298
id: ver-snapshot
10399
run: |
104100
export SNAPSHOT_VERSION=$(sbt common/version -Dsbt.log.noformat=true | grep 'SNAPSHOT' | awk '{ print $2 }')
105-
echo "::set-output name=project_version::$SNAPSHOT_VERSION"
101+
echo "project_version=$SNAPSHOT_VERSION" >> $GITHUB_OUTPUT
106102
107103
- name: Get app package name
108104
id: packageName
109105
run: |
110106
export PACKAGE_NAME=$(sbt "project ${{ matrix.app }}" dockerAlias -Dsbt.log.noformat=true | sed -n '/\[info\]/ s/\[info\] //p' | tail -1 | tr -d '\n' | sed 's/snowplow/opensnowcat/' | cut -d":" -f1)
111-
echo "::set-output name=package_name::$PACKAGE_NAME"
107+
echo "package_name=$PACKAGE_NAME" >> $GITHUB_OUTPUT
112108
113109
- name: Get app base directory
114110
id: baseDirectory
115111
run: |
116112
export BASE_DIRECTORY=$(sbt "project ${{ matrix.app }}" baseDirectory -Dsbt.log.noformat=true | sed -n '/\[info\]/ s/\[info\] //p' | tail -1 | tr -d '\n')
117-
echo "::set-output name=directory::$BASE_DIRECTORY"
113+
echo "directory=$BASE_DIRECTORY" >> $GITHUB_OUTPUT
118114
119115
- name: Get app base directory (distroless)
120116
id: baseDirectoryDistroless
121117
run: |
122118
export BASE_DIRECTORY_DISTROLESS=$(sbt "project ${{ matrix.app }}Distroless" baseDirectory -Dsbt.log.noformat=true | sed -n '/\[info\]/ s/\[info\] //p' | tail -1 | tr -d '\n')
123-
echo "::set-output name=directory::$BASE_DIRECTORY_DISTROLESS"
119+
echo "directory=$BASE_DIRECTORY_DISTROLESS" >> $GITHUB_OUTPUT
124120
125121
- name: Stage the Docker build
126122
run: sbt "project ${{ matrix.app }}" docker:stage
@@ -130,7 +126,7 @@ jobs:
130126

131127
- name: Docker metadata
132128
id: meta
133-
uses: docker/metadata-action@v3
129+
uses: docker/metadata-action@v6
134130
with:
135131
images: ${{ steps.packageName.outputs.package_name }}
136132
tags: |
@@ -145,7 +141,7 @@ jobs:
145141
146142
- name: Docker metadata distroless
147143
id: distroless-meta
148-
uses: docker/metadata-action@v3
144+
uses: docker/metadata-action@v6
149145
with:
150146
images: ${{ steps.packageName.outputs.package_name }}
151147
tags: |
@@ -156,27 +152,27 @@ jobs:
156152
latest=false
157153
158154
- name: Set up QEMU
159-
uses: docker/setup-qemu-action@v3
155+
uses: docker/setup-qemu-action@v4
160156

161157
- name: Set up Docker Buildx
162-
uses: docker/setup-buildx-action@v3
158+
uses: docker/setup-buildx-action@v4
163159

164160
- name: Login to DockerHub
165-
uses: docker/login-action@v3
161+
uses: docker/login-action@v4
166162
with:
167163
username: ${{ secrets.DOCKER_USERNAME }}
168164
password: ${{ secrets.DOCKER_PASSWORD }}
169165

170166
# TODO: login to push images to GitHub Container Registry
171167
# - name: Login to GitHub Container Registry
172-
# uses: docker/login-action@v3
168+
# uses: docker/login-action@v4
173169
# with:
174170
# registry: ghcr.io
175171
# username: ${{ github.actor }}
176172
# password: ${{ secrets.GITHUB_TOKEN }}
177173

178174
- name: Push image
179-
uses: docker/build-push-action@v2
175+
uses: docker/build-push-action@v7
180176
with:
181177
context: ${{ steps.baseDirectory.outputs.directory }}/target/docker/stage
182178
file: ${{ steps.baseDirectory.outputs.directory }}/target/docker/stage/Dockerfile
@@ -191,7 +187,7 @@ jobs:
191187
# ghcr.io/${{ github.repository }}/opensnowcat-enrich-${{ matrix.app }}${{ matrix.suffix }}:${{ steps.ver.outputs.project_version }}-focal
192188

193189
- name: Push distroless image
194-
uses: docker/build-push-action@v2
190+
uses: docker/build-push-action@v7
195191
with:
196192
context: ${{ steps.baseDirectoryDistroless.outputs.directory }}/target/docker/stage
197193
file: ${{ steps.baseDirectoryDistroless.outputs.directory }}/target/docker/stage/Dockerfile
@@ -208,10 +204,10 @@ jobs:
208204
# if: startsWith(github.ref, 'refs/tags/')
209205
# runs-on: ubuntu-latest
210206
# steps:
211-
# - uses: actions/checkout@v2
207+
# - uses: actions/checkout@v6
212208
# - uses: coursier/cache-action@v6
213209
# - name: Set up JDK 11
214-
# uses: actions/setup-java@v1
210+
# uses: actions/setup-java@v5
215211
# with:
216212
# java-version: 11
217213
# - name: Deploy SCE on Maven Central

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ jobs:
2424
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
2525

2626
steps:
27-
- uses: actions/checkout@v4
27+
- uses: actions/checkout@v6
2828
- name: Set up JDK 11
29-
uses: actions/setup-java@v4
29+
uses: actions/setup-java@v5
3030
with:
3131
java-version: 11
3232
distribution: 'corretto'
3333
cache: sbt
3434
- uses: sbt/setup-sbt@v1
3535
with:
36-
sbt-runner-version: 1.9.9
36+
sbt-runner-version: 1.10.11
3737
- name: Start HTTP server to test API enrichment in Common Enrich
3838
run: python integration-tests/common/api-enrichment-test.py 8001 &
3939
- name: Start HTTP server to test API enrichment in Common Fs2

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.9.9
1+
sbt.version=1.10.11

0 commit comments

Comments
 (0)