Skip to content

Commit 5f54d13

Browse files
committed
docker fix
1 parent d098059 commit 5f54d13

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

.github/workflows/ci-cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ jobs:
136136
- name: Run container security scan with Trivy
137137
uses: aquasecurity/trivy-action@master
138138
with:
139-
image-ref: ${{ fromJSON(steps.meta.outputs.tags)[0] }}
139+
image-ref: ${{ steps.meta.outputs.tags }}
140140
format: 'sarif'
141141
output: 'trivy-results.sarif'
142142

test-workflow.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Test Metadata Tags
2+
on: workflow_dispatch
3+
4+
jobs:
5+
test:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Extract metadata
9+
id: meta
10+
uses: docker/metadata-action@v5
11+
with:
12+
images: ghcr.io/test/repo
13+
tags: |
14+
type=ref,event=branch
15+
type=sha,prefix={{branch}}-
16+
17+
- name: Show tags
18+
run: |
19+
echo "Tags: ${{ steps.meta.outputs.tags }}"
20+
echo "First tag would be used by Trivy"

0 commit comments

Comments
 (0)