Skip to content

Commit

Permalink
Adjust SBOM 2
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkondr committed Dec 15, 2022
1 parent 5129092 commit dc795a9
Showing 1 changed file with 52 additions and 52 deletions.
104 changes: 52 additions & 52 deletions .github/workflows/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,65 +77,65 @@ jobs:
git status
git diff --exit-code
- name: Run check-license
run: |
# run license checker on configured files
bin/license-eye -c .licenserc.yaml header check
- name: Run go-sumtype
run: bin/go-sumtype ./...

- name: Run required linters
uses: reviewdog/action-golangci-lint@v2
with:
github_token: ${{ secrets.ROBOT_TOKEN || secrets.GITHUB_TOKEN }}
go_version: ${{ env.GO_VERSION }}
reporter: github-pr-review
fail_on_error: true
cache: false
golangci_lint_flags: "-c=.golangci-required.yml"
golangci_lint_version: v1.49.0

- name: Run go-consistent
env:
COMMAND: 'bin/go-consistent -pedantic -exclude "tests" ./...'
REDIRECT: "| bin/reviewdog -f=go-consistent -reporter=github-pr-review -fail-on-error=true"
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.ROBOT_TOKEN || secrets.GITHUB_TOKEN }}
run: |
if out=$( ${{ env.COMMAND }} ); exit_code=$?; [ $exit_code -ne 0 ]; then
if [ $exit_code -gt 1 ] || ${{ github.event.pull_request == null }}; then
echo "$out"
exit $exit_code
else
echo "$out" ${{ env.REDIRECT }}
fi
else
echo "$out"
fi
- name: Run optional linters
if: github.event_name == 'pull_request'
uses: reviewdog/action-golangci-lint@v2
with:
github_token: ${{ secrets.ROBOT_TOKEN || secrets.GITHUB_TOKEN }}
go_version: ${{ env.GO_VERSION }}
reporter: github-pr-review
fail_on_error: false
cache: false
golangci_lint_flags: "-c=.golangci.yml"
golangci_lint_version: v1.49.0

- name: Test common API
run: make test-common
# - name: Run check-license
# run: |
# # run license checker on configured files
# bin/license-eye -c .licenserc.yaml header check

# - name: Run go-sumtype
# run: bin/go-sumtype ./...

# - name: Run required linters
# uses: reviewdog/action-golangci-lint@v2
# with:
# github_token: ${{ secrets.ROBOT_TOKEN || secrets.GITHUB_TOKEN }}
# go_version: ${{ env.GO_VERSION }}
# reporter: github-pr-review
# fail_on_error: true
# cache: false
# golangci_lint_flags: "-c=.golangci-required.yml"
# golangci_lint_version: v1.49.0

# - name: Run go-consistent
# env:
# COMMAND: 'bin/go-consistent -pedantic -exclude "tests" ./...'
# REDIRECT: "| bin/reviewdog -f=go-consistent -reporter=github-pr-review -fail-on-error=true"
# REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.ROBOT_TOKEN || secrets.GITHUB_TOKEN }}
# run: |
# if out=$( ${{ env.COMMAND }} ); exit_code=$?; [ $exit_code -ne 0 ]; then
# if [ $exit_code -gt 1 ] || ${{ github.event.pull_request == null }}; then
# echo "$out"
# exit $exit_code
# else
# echo "$out" ${{ env.REDIRECT }}
# fi
# else
# echo "$out"
# fi

# - name: Run optional linters
# if: github.event_name == 'pull_request'
# uses: reviewdog/action-golangci-lint@v2
# with:
# github_token: ${{ secrets.ROBOT_TOKEN || secrets.GITHUB_TOKEN }}
# go_version: ${{ env.GO_VERSION }}
# reporter: github-pr-review
# fail_on_error: false
# cache: false
# golangci_lint_flags: "-c=.golangci.yml"
# golangci_lint_version: v1.49.0

# - name: Test common API
# run: make test-common

- name: create SBOM assets
if: startsWith(github.ref, 'refs/tags/')
uses: anchore/sbom-action@v0
with:
path: ./build/...
path: build/
# artifact-name: all.spdx

- name: publish vmproxy SBOM
- name: publish SBOM assets
if: startsWith(github.ref, 'refs/tags/')
uses: anchore/sbom-action/publish-sbom@v0
with:
Expand Down

0 comments on commit dc795a9

Please sign in to comment.