Skip to content

Commit e125ba9

Browse files
fix: image scan issue with github branch name
1 parent f319d83 commit e125ba9

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.github/workflows/publish-backoffice.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ jobs:
6464
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
6565
tags: |
6666
type=raw,value=${{ github.head_ref || github.ref_name }}
67+
type=raw,value=${{ github.sha}}
6768
type=raw,value=commit-${{ github.sha }}-${{ github.head_ref || github.ref_name }}
6869
type=raw,value=${{ steps.get_version.outputs.version }}-${{ github.head_ref || github.ref_name }}
6970
@@ -86,6 +87,7 @@ jobs:
8687
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
8788
tags: |
8889
type=raw,value=prod
90+
type=raw,value=${{ github.sha}}
8991
type=raw,value=commit-${{ github.sha }}-prod
9092
type=raw,value=${{ steps.get_version.outputs.version }}-prod
9193
type=raw,value=latest
@@ -104,7 +106,7 @@ jobs:
104106
- name: Scan Docker Image
105107
uses: aquasecurity/trivy-action@master
106108
with:
107-
image-ref: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.head_ref || github.ref_name }}'
109+
image-ref: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}'
108110
format: 'table'
109111
ignore-unfixed: true
110112
exit-code: 1

.github/workflows/publish-kyb-app.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ jobs:
7171
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
7272
tags: |
7373
type=raw,value=${{ github.head_ref || github.ref_name }}
74+
type=raw,value=${{ github.sha}}
7475
type=raw,value=commit-${{ github.sha }}-${{ github.head_ref || github.ref_name }}
7576
type=raw,value=${{ steps.get_version.outputs.version }}-${{ github.head_ref || github.ref_name }}
7677
@@ -93,6 +94,7 @@ jobs:
9394
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
9495
tags: |
9596
type=raw,value=prod
97+
type=raw,value=${{ github.sha}}
9698
type=raw,value=commit-${{ github.sha }}-prod
9799
type=raw,value=${{ steps.get_version.outputs.version }}-prod
98100
type=raw,value=latest
@@ -110,7 +112,7 @@ jobs:
110112
- name: Scan Docker Image
111113
uses: aquasecurity/trivy-action@master
112114
with:
113-
image-ref: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.head_ref || github.ref_name }}'
115+
image-ref: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha}}'
114116
format: 'table'
115117
ignore-unfixed: true
116118
exit-code: 1

.github/workflows/publish-workflows-dashboard.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ jobs:
6464
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
6565
tags: |
6666
type=raw,value=${{ github.head_ref || github.ref_name }}
67+
type=raw,value=${{ github.sha}}
6768
type=raw,value=commit-${{ github.sha }}-${{ github.head_ref || github.ref_name }}
6869
type=raw,value=${{ steps.get_version.outputs.version }}-${{ github.head_ref || github.ref_name }}
6970
@@ -86,6 +87,7 @@ jobs:
8687
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
8788
tags: |
8889
type=raw,value=prod
90+
type=raw,value=${{ github.sha}}
8991
type=raw,value=commit-${{ github.sha }}-prod
9092
type=raw,value=${{ steps.get_version.outputs.version }}-prod
9193
type=raw,value=latest
@@ -103,7 +105,7 @@ jobs:
103105
- name: Scan Docker Image
104106
uses: aquasecurity/trivy-action@master
105107
with:
106-
image-ref: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.head_ref || github.ref_name }}'
108+
image-ref: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha}}'
107109
format: 'table'
108110
ignore-unfixed: true
109111
exit-code: 1

0 commit comments

Comments
 (0)