Skip to content

Commit

Permalink
BC-6589 update gh-actions (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
Loki-Afro authored Feb 21, 2024
1 parent dd5e505 commit 3d31855
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,18 @@ jobs:
- name: Extract branch meta
shell: bash
id: extract_branch_meta
env:
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
BRANCH_REF_NAME: ${{ github.ref_name}}
BRANCH_SHA: ${{ github.sha }}
run: |
if [ "${{ github.event_name }}" == 'pull_request' ]; then
echo "branch=${{ github.event.pull_request.head.ref }}" >> $GITHUB_OUTPUT
echo "sha=${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
echo "branch=$PR_HEAD_REF" >> $GITHUB_OUTPUT
echo "sha=$PR_HEAD_SHA" >> $GITHUB_OUTPUT
else
echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
echo "sha=${{ github.sha }}" >> $GITHUB_OUTPUT
echo "branch=$BRANCH_REF_NAME" >> $GITHUB_OUTPUT
echo "sha=$BRANCH_SHA" >> $GITHUB_OUTPUT
fi
deploy:
Expand Down Expand Up @@ -113,7 +118,7 @@ jobs:
security-events: write
steps:
- name: run trivy vulnerability scanner
uses: aquasecurity/trivy-action@9ab158e8597f3b310480b9a69402b419bc03dbd5
uses: aquasecurity/trivy-action@1f6384b6ceecbbc6673526f865b818a2a06b07c9
with:
image-ref: 'ghcr.io/${{ github.repository }}:${{ github.sha }}'
format: 'sarif'
Expand All @@ -123,6 +128,6 @@ jobs:
ignore-unfixed: true
- name: upload trivy results
if: ${{ always() }}
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-results.sarif'

0 comments on commit 3d31855

Please sign in to comment.