Repository navigation
Expand file tree
/
Copy pathaction.yml
More file actions
58 lines (58 loc) · 2.24 KB
/
Copy pathaction.yml
File metadata and controls
58 lines (58 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Breadkit Lint
description: Check breadboard circuits and publish SARIF or pull request annotations
inputs:
path:
description: Circuit file or directory to inspect
required: true
upload-sarif:
description: Upload results to GitHub code scanning (requires security-events write)
default: "true"
fail-level:
description: Lowest finding severity that fails the job (error, warning, or info)
default: warning
annotated-image:
description: Render an annotated PNG for one circuit file (requires a PNG backend)
default: "false"
outputs:
sarif-file:
description: Generated SARIF file path when upload-sarif is true
value: ${{ steps.lint.outputs['sarif-file'] }}
image-file:
description: Generated annotated PNG path when annotated-image is true
value: ${{ steps.lint.outputs['image-file'] }}
runs:
using: composite
steps:
- uses: ruby/setup-ruby@a0102e0972be65f351c307e2d64b9314a57c8073 # v1.324.0
with:
ruby-version: "3.4"
- id: lint
name: Check circuits
shell: bash
env:
INPUT_PATH: ${{ inputs.path }}
INPUT_UPLOAD_SARIF: ${{ inputs['upload-sarif'] }}
INPUT_FAIL_LEVEL: ${{ inputs['fail-level'] }}
INPUT_ANNOTATED_IMAGE: ${{ inputs['annotated-image'] }}
run: bash "$GITHUB_ACTION_PATH/scripts/action-run.sh"
- name: Upload annotated image
if: ${{ inputs['annotated-image'] == 'true' && steps.lint.outputs['image-file'] != '' }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: breadkit-annotated
path: ${{ steps.lint.outputs['image-file'] }}
if-no-files-found: error
include-hidden-files: true
retention-days: 1
- name: Upload SARIF
if: ${{ inputs['upload-sarif'] == 'true' && steps.lint.outputs['sarif-file'] != '' }}
uses: github/codeql-action/upload-sarif@1c5b675653bb5c22dbe9b12b556ec555138e09fd # v4.38.1
with:
sarif_file: ${{ steps.lint.outputs['sarif-file'] }}
category: breadkit-lint
- name: Fail on findings
if: ${{ steps.lint.outputs['exit-code'] != '0' }}
shell: bash
env:
BKLINT_EXIT_CODE: ${{ steps.lint.outputs['exit-code'] }}
run: exit "$BKLINT_EXIT_CODE"