fix workflows
This commit is contained in:
parent
6368189f07
commit
a04ac75f85
@ -24,11 +24,9 @@ jobs:
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: |
|
||||
linux/amd64
|
||||
# linux/arm64
|
||||
platforms: linux/amd64
|
||||
push: false
|
||||
|
@ -32,13 +32,11 @@ jobs:
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and publish
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: |
|
||||
linux/amd64
|
||||
# linux/arm64
|
||||
platforms: linux/amd64
|
||||
load: true
|
||||
tags: git.libreschool.org/bglug/bglug.it:latest
|
||||
|
||||
@ -54,13 +52,11 @@ jobs:
|
||||
run: if [ $(jq '.Results[0].Vulnerabilities|length' trivy-results.json) -ne "0" ] ; then exit 1 ; fi
|
||||
|
||||
- name: Build and publish
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: |
|
||||
linux/amd64
|
||||
# linux/arm64
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: git.libreschool.org/bglug/bglug.it:latest
|
||||
|
||||
|
@ -32,7 +32,10 @@ jobs:
|
||||
|
||||
# if some vulnerability is found, we fail
|
||||
- name: check output
|
||||
run: if [ $(jq '.Results[0].Vulnerabilities|length' trivy-results.json) -ne "0" ] ; then exit 1 ; fi
|
||||
id: vulncount
|
||||
run: |
|
||||
echo "VULNCOUNT=$(jq '.Results[0].Vulnerabilities|length' trivy-results.json)" >> ${GITHUB_OUTPUT}
|
||||
if [ $(jq '.Results[0].Vulnerabilities|length' trivy-results.json) -ne "0" ] ; then exit 1 ; fi
|
||||
|
||||
- name: send mattermost notification
|
||||
if: failure()
|
||||
@ -40,5 +43,5 @@ jobs:
|
||||
with:
|
||||
MATTERMOST_WEBHOOK_URL: ${{ secrets.MM_WEBHOOK_URL }}
|
||||
TEXT: |
|
||||
Found **${{ steps.vulncount.outputs.VULNCOUNT }}** vulnerabilities in `${{ github.repository }}`
|
||||
:bug: Found **${{ steps.vulncount.outputs.VULNCOUNT }}** vulnerabilities in `${{ github.repository }}`
|
||||
MATTERMOST_ICON: https://cdn3.iconfinder.com/data/icons/system-basic-vol-4-1/20/icon-note-attention-alt3-512.png
|
||||
|
Loading…
x
Reference in New Issue
Block a user