Skip to content

Commit fc497f2

Browse files
authored
ci: fix Trivy scan tag extraction and update SARIF action to v4 (#17)
Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
1 parent b9144cb commit fc497f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
type=ref,event=branch
4848
- name: Extract first tag
4949
run: |
50-
FIRST_TAG=$(echo "${{ steps.meta.outputs.tags }}" | head -n1)
50+
FIRST_TAG=$(echo "${{ steps.meta.outputs.tags }}" | head -n1 | rev | cut -d: -f1 | rev)
5151
echo "FIRST_TAG=$FIRST_TAG" >> $GITHUB_ENV
5252
- name: push
5353
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 https://github.com/docker/build-push-action/releases/tag/v6.18.0
@@ -65,7 +65,7 @@ jobs:
6565
format: 'sarif'
6666
output: 'trivy-results-${{ env.FIRST_TAG }}.sarif'
6767
- name: Upload Trivy scan results to GitHub Security tab
68-
uses: github/codeql-action/upload-sarif@d3ced5c96c16c4332e2a61eb6f3649d6f1b20bb8 # v3.31.5
68+
uses: github/codeql-action/upload-sarif@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4.31.5
6969
if: always()
7070
with:
7171
sarif_file: 'trivy-results-${{ env.FIRST_TAG }}.sarif'

0 commit comments

Comments
 (0)