File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 3131 - run : dfetch update
3232 - run : dfetch update
3333 - name : Dfetch SARIF Check
34- uses : ./.github/actions/dfetch-action
34+ uses : .
3535 with :
3636 working-directory : ' .'
3737
8787 - run : dfetch update
8888 - run : dfetch update
8989 - name : Dfetch SARIF Check
90- uses : ./.github/actions/dfetch-action
90+ uses : .
9191 with :
9292 working-directory : ' .'
9393
Original file line number Diff line number Diff line change @@ -37,11 +37,29 @@ See [alternatives](https://dfetch.readthedocs.io/en/latest/alternatives.html) fo
3737## Install
3838
3939### Stable
40+
4041``` bash
4142pip install dfetch
4243```
4344
4445### latest version
46+
4547``` bash
4648pip install https://github.com/dfetch-org/dfetch/archive/main.zip
4749```
50+
51+ ## Github Action
52+
53+ You can use DFetch in your Github Actions workflow to check your dependencies.
54+ The results will be uploaded to Github. Add the following to your workflow file:
55+
56+ ``` yaml
57+ jobs :
58+ dfetch-check :
59+ runs-on : ubuntu-latest
60+ steps :
61+ - name : Run Dfetch Check
62+ uses : dfetch-org/dfetch@main
63+ with :
64+ working-directory : ' .' # optional, defaults to project root
65+ ` ` `
Original file line number Diff line number Diff line change 1+ name : ' Dfetch Check'
2+ description : ' Run dfetch check and upload SARIF results.'
3+ author : ' dfetch-org'
4+ branding :
5+ icon : ' check-circle'
6+ color : ' blue'
7+
8+ inputs :
9+ working-directory :
10+ description : ' Directory to run dfetch in (default: project root)'
11+ required : false
12+ default : ' .'
13+
14+ outputs :
15+ sarif-path :
16+ description : ' Path to the generated SARIF file.'
17+ value : sarif.json
18+
19+ runs :
20+ using : ' composite'
21+ steps :
22+ - name : Checkout repository
23+ uses : actions/checkout@v4
24+ - name : Setup Python
25+ uses : actions/setup-python@v5
26+ with :
27+ python-version : ' 3.13'
28+ - name : Install dfetch
29+ run : pip install .
30+ shell : bash
31+ - name : Run dfetch check (SARIF)
32+ run : dfetch check --sarif sarif.json
33+ shell : bash
34+ working-directory : ${{ inputs.working-directory }}
35+ - name : Upload SARIF file
36+ uses : github/codeql-action/upload-sarif@v3
37+ with :
38+ sarif_file : sarif.json
You can’t perform that action at this time.
0 commit comments