Skip to content

Merge pull request #46 from SAP/dependabot/github_actions/actions/set… #98

Merge pull request #46 from SAP/dependabot/github_actions/actions/set…

Merge pull request #46 from SAP/dependabot/github_actions/actions/set… #98

Workflow file for this run

# SPDX-FileCopyrightText: 2020 SAP SE
# SPDX-FileCopyrightText: 2021 SAP SE
# SPDX-FileCopyrightText: 2022 SAP SE
# SPDX-FileCopyrightText: 2023 SAP SE
#
# SPDX-License-Identifier: Apache-2.0
---
name: CI
on:
push:
branches-ignore:
# Dependabot pushes are already run for the PR itself.
- 'dependabot/**'
pull_request: {}
workflow_dispatch: {}
jobs:
vulnerability-check:
runs-on: ubuntu-latest
steps:
# Setup go
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
# govulncheck
- name: Check for go vulnerabilities
uses: golang/govulncheck-action@v1
generate-required:
runs-on: ubuntu-latest
steps:
# Setup stringer
- uses: actions/setup-go@v4
- run: go install golang.org/x/tools/cmd/stringer@latest
# Setup python and reuse
- uses: actions/setup-python@v5
- uses: BSFishy/pip-action@v1
with:
packages: reuse
# Generate
- uses: actions/checkout@v4
- run: PATH="$(go env GOPATH)/bin:$PATH" make generate
- run: |
if [ "$(git status --porcelain | wc -l)" -ne 0 ]; then
printf '::error ::%s' '`make generate` left or changed files'
git status
git diff
exit 1
fi
license:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: fsfe/reuse-action@v1.1