File tree Expand file tree Collapse file tree 4 files changed +81
-3
lines changed
Expand file tree Collapse file tree 4 files changed +81
-3
lines changed Original file line number Diff line number Diff line change 11name : ci
22on :
3+ workflow_run :
4+ workflows : ['snyk']
5+ types :
6+ - completed
7+ branches :
8+ - snyk-fix-*
9+ - snyk-upgrade-*
310 push :
411 branches :
512 - main
916 types :
1017 - published
1118
19+ env :
20+ SKIP_SNYK_PRS : ${{ github.event_name == 'pull_request' && startsWith(github.head_ref, 'snyk-') }}
21+
1222jobs :
1323 build :
1424 name : " build"
1525 runs-on : ubuntu-latest
26+ if : env.SKIP_SNYK_PRS != 'true'
1627 steps :
1728 - name : checkout
1829 uses : actions/checkout@v4
5465 lint-npm :
5566 name : " lint-npm"
5667 runs-on : ubuntu-latest
68+ if : env.SKIP_SNYK_PRS != 'true'
5769 steps :
5870 - name : checkout
5971 uses : actions/checkout@v4
6779 test-npm :
6880 name : " test-npm"
6981 runs-on : ubuntu-latest
82+ if : env.SKIP_SNYK_PRS != 'true'
7083 steps :
7184 - name : checkout
7285 uses : actions/checkout@v4
8093 type-check :
8194 name : " type-check"
8295 runs-on : ubuntu-latest
96+ if : env.SKIP_SNYK_PRS != 'true'
8397 steps :
8498 - name : checkout
8599 uses : actions/checkout@v4
93107 lint-schemas :
94108 name : " Validate plugin schemas"
95109 runs-on : ubuntu-latest
110+ if : env.SKIP_SNYK_PRS != 'true'
96111 steps :
97112 - name : checkout
98113 uses : actions/checkout@v4
@@ -117,6 +132,7 @@ jobs:
117132 golangci :
118133 name : lint
119134 runs-on : ubuntu-latest
135+ if : env.SKIP_SNYK_PRS != 'true'
120136 steps :
121137 - name : checkout
122138 uses : actions/checkout@v4
@@ -135,6 +151,7 @@ jobs:
135151 module-check :
136152 name : " Check plugin modules"
137153 runs-on : ubuntu-latest
154+ if : env.SKIP_SNYK_PRS != 'true'
138155 steps :
139156 - name : checkout
140157 uses : actions/checkout@v4
Original file line number Diff line number Diff line change 11name : doc
22on :
3+ workflow_run :
4+ workflows : ['snyk']
5+ types :
6+ - completed
7+ branches :
8+ - snyk-fix-*
9+ - snyk-upgrade-*
310 push :
411 branches :
512 - main
1017 pull_request :
1118 merge_group :
1219
20+ env :
21+ SKIP_SNYK_PRS : ${{ github.event_name == 'pull_request' && startsWith(github.head_ref, 'snyk-') }}
22+
1323jobs :
1424 docs-fmt :
1525 name : " Check docs format"
1626 runs-on : ubuntu-latest
27+ if : env.SKIP_SNYK_PRS != 'true'
1728 steps :
1829 - name : checkout
1930 uses : actions/checkout@v4
2536 run : go install github.com/bwplotka/mdox@latest
2637 - name : check docs
2738 run : make checkdocs
28-
29-
Original file line number Diff line number Diff line change 1+ name : snyk
2+ on :
3+ pull_request :
4+ branches :
5+ - main
6+ merge_group :
7+
8+ jobs :
9+ lockfile-update :
10+ name : ' regenerate lockfile'
11+ runs-on : ubuntu-latest
12+ permissions :
13+ contents : write
14+ if : startsWith(github.head_ref, 'snyk-')
15+ outputs :
16+ lockfile-updated : ${{ steps.lockfile-changes.outputs.has_changes }}
17+ steps :
18+ - name : checkout
19+ uses : actions/checkout@v4
20+ with :
21+ token : ${{ secrets.GITHUB_TOKEN }}
22+ fetch-depth : 2
23+
24+ 25+ - uses : ./.github/perses-ci/actions/setup_environment
26+ with :
27+ enable_npm : true
28+ - name : install dependencies
29+ run : npm install
30+
31+ - name : check for lockfile changes
32+ id : lockfile-changes
33+ run : |
34+ if git diff --quiet package-lock.json; then
35+ echo "has_changes=false" >> $GITHUB_OUTPUT
36+ else
37+ echo "has_changes=true" >> $GITHUB_OUTPUT
38+ fi
39+
40+ - name : Get last commit message
41+ id : last-commit
42+ run : |
43+ echo "message=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT
44+ echo "author=$(git log -1 --pretty=\"%an <%ae>\")" >> $GITHUB_OUTPUT
45+
46+ - uses: stefanzweifel/git-auto-commit-action@v6
47+ if: steps.lockfile-changes.outputs.has_changes == 'true'
48+ with:
49+ commit_message: "[IGNORE] ${{ steps.last-commit.outputs.message }}
50+ file_pattern: 'package-lock.json'
51+ commit_options: '--no-verify --signoff --amend'
52+ push_options: '--force-with-lease'
Original file line number Diff line number Diff line change 2626 "dependencies" : {
2727 "@codemirror/autocomplete" : " ^6.18.4" ,
2828 "@lezer/highlight" : " ^1.2.1x" ,
29- "@grafana/lezer-traceql" : " ^0.0.20 "
29+ "@grafana/lezer-traceql" : " ^0.0.22 "
3030 },
3131 "peerDependencies" : {
3232 "@emotion/react" : " ^11.7.1" ,
You can’t perform that action at this time.
0 commit comments