diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 894fb8b..034265f 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -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 diff --git a/.gitea/workflows/build_and_push.yaml b/.gitea/workflows/build_and_push.yaml index 6416952..7194b79 100644 --- a/.gitea/workflows/build_and_push.yaml +++ b/.gitea/workflows/build_and_push.yaml @@ -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 diff --git a/.gitea/workflows/vulnscan.yaml b/.gitea/workflows/vulnscan.yaml index b72bb80..d06e3e8 100644 --- a/.gitea/workflows/vulnscan.yaml +++ b/.gitea/workflows/vulnscan.yaml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest container: image: catthehacker/ubuntu:act-latest - + steps: - name: Login to registry uses: docker/login-action@v3 @@ -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