Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

Bump github.com/stretchr/testify from 1.8.1 to 1.8.3 #964

Bump github.com/stretchr/testify from 1.8.1 to 1.8.3

Bump github.com/stretchr/testify from 1.8.1 to 1.8.3 #964

Workflow file for this run

name: Trivy
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
schedule:
- cron: '0 4 * * *'
env:
NAME: "mqtt-log-stdout"
jobs:
trivy:
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v3
- name: Prepare
id: prep
run: |
VERSION=sha-${GITHUB_SHA::8}
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF/refs\/tags\//}
fi
echo ::set-output name=BUILD_DATE::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo ::set-output name=VERSION::${VERSION}
- uses: brpaz/hadolint-action@v1.5.0
with:
dockerfile: Dockerfile
- name: Cache container layers
uses: actions/cache@v3.0.6
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Set up QEMU
uses: docker/setup-qemu-action@v2.0.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.0.0
- name: Build container (multi arch)
uses: docker/build-push-action@v3.1.1
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
tags: ${{ env.NAME }}:${{ steps.prep.outputs.VERSION }}
load: true
labels: |
org.opencontainers.image.title=${{ github.event.repository.name }}
org.opencontainers.image.description=${{ github.event.repository.description }}
org.opencontainers.image.url=${{ github.event.repository.html_url }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.version=${{ steps.prep.outputs.VERSION }}
org.opencontainers.image.created=${{ steps.prep.outputs.BUILD_DATE }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ env.NAME }}:${{ steps.prep.outputs.VERSION }}
format: 'template'
template: '@/contrib/sarif.tpl'
output: 'trivy-results.sarif'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivy-results.sarif'