Chore(deps): Bump anchore/sbom-action from 0.24.0 to 0.24.2 #23446
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: Main | |
| on: | |
| pull_request: | |
| paths-ignore: | |
| - "documentation/**" | |
| - "dashboards/**" | |
| permissions: | |
| contents: read | |
| jobs: | |
| check: | |
| name: Checks | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| env: | |
| PMM_ENCRYPTION_KEY_PATH: pmm-encryption.key | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup Go | |
| uses: ./.github/actions/setup-go | |
| - name: Install development tools | |
| run: make init | |
| - name: Generate files | |
| run: make gen | |
| - name: Check build | |
| run: make release | |
| - name: Check files are formatted and no source code changes | |
| run: | | |
| make format | |
| go mod tidy -v | |
| git status | |
| git diff --exit-code | |
| - name: Update API compatibility descriptors | |
| run: | | |
| # log if descriptors changed, useful for "update descriptors" PRs | |
| make -C api descriptors | |
| git diff --text | |
| - name: Run check-license | |
| run: | | |
| # run license checker on configured files | |
| go tool license-eye -c .licenserc.yaml header check | |
| - name: Run go-sumtype | |
| run: go tool go-sumtype ./... | |
| - name: Run API linter | |
| env: | |
| REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.ROBOT_TOKEN || secrets.GITHUB_TOKEN }} | |
| run: | | |
| if out=$(go tool buf lint -v api); code="$?"; test "$code" -eq 0; then | |
| echo "$out" | |
| exit 0 | |
| fi | |
| echo "API linter exited with code: $code" | |
| echo "$out" | |
| ## buf uses exit code 100 for linter warnings | |
| if [ "$code" -ne 100 ] || ${{ github.event.pull_request == null }}; then | |
| exit $code | |
| fi | |
| # One may need to suppress passing to reviewdog because of https://github.com/reviewdog/reviewdog/issues/1696 | |
| echo "$out" | go tool reviewdog -f=buf -reporter=github-pr-review -fail-level=error | |
| - name: Run code linters | |
| uses: reviewdog/action-golangci-lint@c76cceaaab89abe74e649d2e34c6c9adc26662d2 # v2.10.0 | |
| if: ${{ github.event_name == 'pull_request' }} | |
| with: | |
| github_token: ${{ secrets.ROBOT_TOKEN || secrets.GITHUB_TOKEN }} | |
| go_version_file: ${{ github.workspace }}/go.mod | |
| reporter: github-pr-review | |
| fail_level: error | |
| cache: false | |
| golangci_lint_flags: "-c=.golangci.yml" | |
| golangci_lint_version: v2.12.2 # Version should match specified in Makefile | |
| - name: Test common API | |
| run: make test-common | |
| - name: Run debug commands on failure | |
| if: ${{ failure() }} | |
| run: | | |
| env | sort | |
| go env | sort | |
| git status | |
| workflow_success: | |
| needs: [ check ] | |
| name: Slack Notification success | |
| runs-on: ubuntu-latest | |
| env: | |
| SLACK_WEBHOOK: ${{ secrets.SLACK_TOKEN_PMM_CI }} | |
| SLACK_CHANNEL: "pmm-ci" | |
| SLACK_USERNAME: "PR bot v3" | |
| SLACK_ICON_EMOJI: ":octocat:" | |
| SLACK_COLOR: "#00FF00" | |
| SLACK_TITLE: "Finished ${{ github.event.repository.name }} workflow" | |
| SLACK_MESSAGE: "${{ github.event.inputs.repo || github.repository }}:${{ github.event.inputs.branch || github.head_ref }}" | |
| steps: | |
| - name: Slack Notification | |
| uses: rtCamp/action-slack-notify@33ca3be66c6f378fe1610fd1d5258632dbed5e58 # v2.4.0 | |
| workflow_failure: | |
| if: ${{ failure() }} | |
| needs: [ check ] | |
| name: Slack Notification failure | |
| runs-on: ubuntu-latest | |
| env: | |
| SLACK_WEBHOOK: ${{ secrets.SLACK_TOKEN_PMM_CI }} | |
| SLACK_CHANNEL: "pmm-ci" | |
| SLACK_USERNAME: "PR bot v3" | |
| SLACK_ICON_EMOJI: ":octocat:" | |
| SLACK_COLOR: "#FF0000" | |
| SLACK_TITLE: "Finished ${{ github.event.repository.name }} workflow" | |
| SLACK_MESSAGE: "Workflow failed: ${{ github.event.inputs.repo || github.repository }}:${{ github.event.inputs.branch || github.head_ref }}" | |
| steps: | |
| - name: Slack Notification | |
| uses: rtCamp/action-slack-notify@33ca3be66c6f378fe1610fd1d5258632dbed5e58 # v2.4.0 |