fix workflows
This commit is contained in:
parent
6368189f07
commit
a04ac75f85
@ -24,11 +24,9 @@ jobs:
|
|||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
platforms: |
|
platforms: linux/amd64
|
||||||
linux/amd64
|
|
||||||
# linux/arm64
|
|
||||||
push: false
|
push: false
|
||||||
|
@ -32,13 +32,11 @@ jobs:
|
|||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
|
||||||
- name: Build and publish
|
- name: Build and publish
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
platforms: |
|
platforms: linux/amd64
|
||||||
linux/amd64
|
|
||||||
# linux/arm64
|
|
||||||
load: true
|
load: true
|
||||||
tags: git.libreschool.org/bglug/bglug.it:latest
|
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
|
run: if [ $(jq '.Results[0].Vulnerabilities|length' trivy-results.json) -ne "0" ] ; then exit 1 ; fi
|
||||||
|
|
||||||
- name: Build and publish
|
- name: Build and publish
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
platforms: |
|
platforms: linux/amd64
|
||||||
linux/amd64
|
|
||||||
# linux/arm64
|
|
||||||
push: true
|
push: true
|
||||||
tags: git.libreschool.org/bglug/bglug.it:latest
|
tags: git.libreschool.org/bglug/bglug.it:latest
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: catthehacker/ubuntu:act-latest
|
image: catthehacker/ubuntu:act-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Login to registry
|
- name: Login to registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
@ -32,7 +32,10 @@ jobs:
|
|||||||
|
|
||||||
# if some vulnerability is found, we fail
|
# if some vulnerability is found, we fail
|
||||||
- name: check output
|
- 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
|
- name: send mattermost notification
|
||||||
if: failure()
|
if: failure()
|
||||||
@ -40,5 +43,5 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
MATTERMOST_WEBHOOK_URL: ${{ secrets.MM_WEBHOOK_URL }}
|
MATTERMOST_WEBHOOK_URL: ${{ secrets.MM_WEBHOOK_URL }}
|
||||||
TEXT: |
|
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
|
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