Skip to content

Commit e7b44e5

Browse files
committed
Fix vul
1 parent 20cbec9 commit e7b44e5

File tree

4 files changed

+30
-19
lines changed

4 files changed

+30
-19
lines changed

.github/workflows/_unit_test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,12 @@ jobs:
3636
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3737
- name: Generate lockfile
3838
id: lockfile
39+
env:
40+
LOCKFILE: lockfile-${{ inputs.alias }}-${{ github.run_id }}
3941
run: |
4042
bundle lock
41-
echo "lockfile=lockfile-${{ inputs.alias }}-${{ github.run_id }}" >> $GITHUB_OUTPUT
43+
echo "lockfile=$LOCKFILE" >> $GITHUB_OUTPUT
44+
4245
- name: Upload lockfile
4346
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
4447
with:

.github/workflows/build-gem.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,13 @@ jobs:
3737
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
3838
- name: Patch version
3939
if: ${{ matrix.type != 'final' }}
40+
env:
41+
GHA_RUN_ID: ${{ github.run_id }}
42+
GIT_REF: ${{ github.ref }}
43+
GIT_SHA: ${{ github.sha }}
4044
run: |
41-
# Obtain context information
42-
gha_run_id='${{ github.run_id }}'
43-
git_ref='${{ github.ref }}'
44-
git_sha='${{ github.sha }}'
45+
.gitlab/patch_gem_version.sh gha $GHA_RUN_ID $GIT_REF $GIT_SHA;
4546
46-
# Output info for CI debug
47-
echo gha_run_id="${gha_run_id}"
48-
echo git_ref="${git_ref}"
49-
echo git_sha="${git_sha}"
50-
51-
.gitlab/patch_gem_version.sh gha $gha_run_id $git_ref $git_sha;
5247
- name: Patch gem host
5348
if: ${{ matrix.type != 'final' }}
5449
run: |

.github/workflows/system-tests.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,11 @@ jobs:
8787
run: |
8888
docker image list
8989
- name: Log in to the Container registry
90-
run: |
91-
echo ${{ secrets.GITHUB_TOKEN }} | docker login ${{ env.REGISTRY }} -u ${{ github.actor }} --password-stdin
90+
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
91+
with:
92+
registry: ${{ env.REGISTRY }}
93+
username: ${{ github.actor }}
94+
password: ${{ secrets.GITHUB_TOKEN }}
9295
- name: Tag image for CI run
9396
run: docker tag ${{ matrix.image.internal }} ${{ env.REPO }}/system-tests/${{ matrix.image.name }}:gha${{ github.run_id }}-g${{ github.sha }}
9497
- name: Push image for CI run
@@ -182,8 +185,11 @@ jobs:
182185
docker pull "${{ env.REPO }}/system-tests/${{ matrix.library.name }}/${{ matrix.image }}-${{ matrix.app }}:g${sha}" || true
183186
done
184187
- name: Log in to the Container registry
185-
run: |
186-
echo ${{ secrets.GITHUB_TOKEN }} | docker login ${{ env.REGISTRY }} -u ${{ github.actor }} --password-stdin
188+
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
189+
with:
190+
registry: ${{ env.REGISTRY }}
191+
username: ${{ github.actor }}
192+
password: ${{ secrets.GITHUB_TOKEN }}
187193
- name: Build
188194
run: |
189195
cache_from=()
@@ -470,8 +476,11 @@ jobs:
470476
name: Cleanup (${{ matrix.image }})
471477
steps:
472478
- name: Log in to the Container registry
473-
run: |
474-
echo ${{ secrets.GITHUB_TOKEN }} | docker login ${{ env.REGISTRY }} -u ${{ github.actor }} --password-stdin
479+
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
480+
with:
481+
registry: ${{ env.REGISTRY }}
482+
username: ${{ github.actor }}
483+
password: ${{ secrets.GITHUB_TOKEN }}
475484
- uses: actions/delete-package-versions@e5bc658cc4c965c472efe991f8beea3981499c55 # v5.0.0
476485
with:
477486
package-version-ids: "gha${{ github.run_id }}-g${{ github.sha }}"

.github/workflows/test.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,13 @@ jobs:
147147
#
148148
# This is a workaround to manually set the correct git commit sha for the pull request event.
149149
- if: github.event_name == 'pull_request'
150-
run: echo "DD_GIT_COMMIT_SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
150+
env:
151+
DD_GIT_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
152+
run: echo "DD_GIT_COMMIT_SHA=$DD_GIT_COMMIT_SHA" >> $GITHUB_ENV
151153
- if: github.event_name != 'pull_request'
152-
run: echo "DD_GIT_COMMIT_SHA=${{ github.sha }}" >> $GITHUB_ENV
154+
env:
155+
DD_GIT_COMMIT_SHA: ${{ github.sha }}
156+
run: echo "DD_GIT_COMMIT_SHA=$DD_GIT_COMMIT_SHA" >> $GITHUB_ENV
153157
- run: echo $DD_GIT_COMMIT_SHA
154158
- name: Upload junit reports
155159
run: datadog-ci junit upload --verbose tmp/rspec/

0 commit comments

Comments
 (0)