Skip to content

Commit ab2c39d

Browse files
committed
chore: update actions and dependencies in ci.yml and cd.yml to latest versions
1 parent cf0e734 commit ab2c39d

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

.github/workflows/cd.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
environment: STAGE
3939
steps:
4040
- name: Checkout repository
41-
uses: actions/checkout@v3
41+
uses: actions/checkout@v4.2.2
4242

4343
- name: Deploy to Kubernetes [STAGING ENVIRONMENT]
4444
run: |
@@ -67,7 +67,7 @@ jobs:
6767
needs: [staging-end2end-tests]
6868
steps:
6969
- name: Checkout repository
70-
uses: actions/checkout@v3
70+
uses: actions/checkout@v4.2.2
7171

7272
- name: 'Az CLI Login via OIDC'
7373
uses: azure/login@v1.4.6
@@ -78,21 +78,21 @@ jobs:
7878

7979
# Use kubelogin to configure your kubeconfig for Azure auth
8080
- name: Set up kubelogin for non-interactive login
81-
uses: azure/use-kubelogin@v1
81+
uses: azure/use-kubelogin@v1.2
8282
with:
8383
kubelogin-version: 'v0.0.25'
8484

8585
# Retrieves your Azure Kubernetes Service cluster's kubeconfig file
8686
- name: Get K8s context
87-
uses: azure/aks-set-context@v3
87+
uses: azure/aks-set-context@v4.0.1
8888
with:
8989
resource-group: ${{ env.RESOURCE_GROUP }}
9090
cluster-name: ${{ env.CLUSTER_NAME }}
9191
admin: 'false'
9292
use-kubelogin: 'true'
9393

9494
- name: Install Helm
95-
uses: azure/setup-helm@v1
95+
uses: azure/setup-helm@v4.2.0
9696
with:
9797
version: v3.12.2
9898

.github/workflows/ci.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
# defining steps for the job as explained above
7676
steps:
7777
- name: Checkout repository
78-
uses: actions/checkout@v3 # cache maven packages step - caching maven packages to speed up the build process. Link to the documentation - https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows
78+
uses: actions/checkout@v4.2.2 # cache maven packages step - caching maven packages to speed up the build process. Link to the documentation - https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows
7979
- name: Cache Maven packages
8080
uses: actions/cache@v3 # defining cache key and restore keys for the cache step. Link to the documentation - https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#matching-a-cache-key
8181
with:
@@ -156,7 +156,7 @@ jobs:
156156
runner-index: ${{ fromjson(needs.runner-indexes.outputs.json) }} # using the runner-indexes job output to define the matrix strategy
157157
steps:
158158
- name: Checkout repository # checkout the repository
159-
uses: actions/checkout@v3.0.2
159+
uses: actions/checkout@v4.2.2
160160
# caching the maven packages to speed up the build process.
161161
# Link to the documentation - https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows
162162
- name: Cache Maven packages
@@ -167,14 +167,17 @@ jobs:
167167
restore-keys: ${{ runner.os }}-junit- # key for restoring the cache if no exact match is found
168168
# In this step, we are downloading the latest artifact from the build job and storing it in the container
169169
- run: |
170-
# Download the latest tests results artifact number from the GitHub API using jq to parse the JSON response
171-
curl \
170+
# Download the latest test results artifact number using GitHub API
171+
LATEST_ARTIFACT_NUMBER=$(curl \
172172
-H "Accept: application/vnd.github+json" \
173-
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"\
173+
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
174174
-H "X-GitHub-Api-Version: 2022-11-28" \
175-
https://api.github.com/repos/${{ github.repository }}/actions/artifacts | jq -r '.artifacts | sort_by(.created_at) | .[] | select(.name == "Test Results") | .id' > artifacts_list.txt
176-
177-
LATEST_ARTIFACT_NUMBER=$(cut -d: -f 2 artifacts_list.txt | sort -n | tail -n 1)
175+
https://api.github.com/repos/${{ github.repository }}/actions/artifacts | \
176+
jq -r '.artifacts | sort_by(.created_at) | .[] | select(.name == "Test Results") | .id' | \
177+
sort -n | tail -n 1)
178+
179+
# Save the artifact number to the environment file
180+
echo "LATEST_ARTIFACT_NUMBER=${LATEST_ARTIFACT_NUMBER}" >> $GITHUB_ENV
178181
179182
curl \
180183
-H "Accept: application/vnd.github+json" \
@@ -193,7 +196,7 @@ jobs:
193196
# split-tests action - splits the tests into x number of groups
194197
# based on the total number of github-hosted runners and junit previous test results by time and line count.
195198
# Link to the action - https://github.com/marketplace/actions/split-tests
196-
- uses: chaosaffe/split-tests@v1-alpha.1
199+
- uses: scruplelesswizard/split-tests@v1-alpha.1
197200
id: split-tests
198201
name: Split tests
199202
with:
@@ -224,7 +227,7 @@ jobs:
224227
runs-on: ubuntu-latest
225228
steps:
226229
- name: Checkout repository
227-
uses: actions/checkout@v3
230+
uses: actions/checkout@v4.2.2
228231

229232
- name: List Artifacts
230233
id: list-artifacts
@@ -273,7 +276,7 @@ jobs:
273276
# 6. push the docker image to the GitHub Container Registry
274277
steps:
275278
- name: Checkout repository
276-
uses: actions/checkout@v3
279+
uses: actions/checkout@v4.2.2
277280
- uses: actions/download-artifact@v4.1.8
278281
with:
279282
name: jar-artifact
@@ -290,7 +293,7 @@ jobs:
290293

291294
- name: Build and push Docker image
292295
id: build_image
293-
uses: docker/build-push-action@v4 # using the docker build and push action from the github marketplace - github.com/marketplace/actions/build-and-push-docker-images
296+
uses: docker/build-push-action@v6.9.0 # using the docker build and push action from the github marketplace - github.com/marketplace/actions/build-and-push-docker-images
294297
with:
295298
context: . # using the current directory as the context
296299
push: true # push the docker image to the registry

0 commit comments

Comments
 (0)