26
26
dependency-graph :
27
27
name : Update Dependency Graph
28
28
runs-on : ubuntu-latest # or windows-latest, or macOS-latest
29
- permissions :
30
- contents : write # this permission is needed to submit the dependency graph
31
29
steps :
32
30
- uses : actions/checkout@v3
33
31
- uses : scalacenter/sbt-dependency-submission@v2
@@ -52,9 +50,12 @@ Example: `foo_2.13 bar_2.13`
52
50
In this example the snapshot will not contain the graphs of `foo_2.13` and `bar_3`.
53
51
54
52
` ` ` yaml
53
+
54
+ ## in .github/workflows/dependency-graph.md
55
+ ...
55
56
steps:
56
57
- uses: actions/checkout@v3
57
- - uses: scalacenter/sbt-dependency-submission@v1
58
+ - uses: scalacenter/sbt-dependency-submission@v2
58
59
with:
59
60
base-dir: ./my-scala-project
60
61
modules-ignore: foo_2.13 bar_3
@@ -69,4 +70,37 @@ You can enable it in `Settings` > `Code Security and Analysis`.
69
70
70
71

71
72
73
+ # ## Unexpected Status: 403
74
+
75
+ This error happens when the workflow does not have the right permission on the repository.
76
+
77
+ First you should check that the workflow is not triggered on PR from forked repositories.
78
+ It should be triggered by push to the default branch.
79
+
80
+ ` ` ` yaml
81
+ ## in .github/workflows/dependency-graph.md
82
+ on:
83
+ push:
84
+ branches:
85
+ - main # default branch of the project
86
+ ...
87
+ ` ` `
88
+
89
+ Then check that you enabled the read and write permissions for all workflows, at the bottom of the `Settings > Actions > General` page.
90
+
91
+ 
92
+
93
+ If you do not want to enable this you can add the write permission on the `dependency-graph` workflow only :
94
+
95
+ ` ` ` yaml
96
+ ## in .github/workflows/dependency-graph.md
97
+ ...
98
+ permissions:
99
+ contents: write # this permission is needed to submit the dependency graph
100
+ ...
101
+ ` ` `
102
+
103
+
104
+
105
+
72
106
0 commit comments