Skip to content

Commit 44373b5

Browse files
serhalp43081j
andauthored
ci: add e18e dependency diff workflow (#2435)
Co-authored-by: James Garbutt <43081j@users.noreply.github.com>
1 parent fd7703c commit 44373b5

File tree

2 files changed

+78
-0
lines changed

2 files changed

+78
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: dependency-diff-comment
2+
3+
on:
4+
workflow_run:
5+
workflows: ['dependency-diff']
6+
types:
7+
- completed
8+
9+
permissions:
10+
pull-requests: write
11+
actions: read
12+
13+
jobs:
14+
dependency-diff-comment:
15+
name: 💬 Dependency diff comment
16+
runs-on: ubuntu-slim
17+
if: github.event.workflow_run.conclusion == 'success'
18+
19+
steps:
20+
- name: 📥 Download artifact
21+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
22+
with:
23+
name: e18e-diff-result
24+
run-id: ${{ github.event.workflow_run.id }}
25+
github-token: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: 💬 Post comment
28+
uses: e18e/action-dependency-diff@d995338f3b229fe7b2cd82048df5da930f70c7c3 # v1.4.4
29+
with:
30+
mode: comment-from-artifact
31+
artifact-path: e18e-diff-result.json
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: dependency-diff
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- release
8+
paths:
9+
- package.json
10+
- pnpm-lock.yaml
11+
- pnpm-workspace.yaml
12+
- docs/package.json
13+
- cli/package.json
14+
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
17+
cancel-in-progress: true
18+
19+
permissions:
20+
contents: read
21+
22+
jobs:
23+
dependency-diff:
24+
name: 🔎 Dependency diff
25+
runs-on: ubuntu-slim
26+
27+
steps:
28+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
29+
with:
30+
fetch-depth: 0
31+
32+
- name: 🔎 Compare dependencies
33+
id: analyze
34+
uses: e18e/action-dependency-diff@d995338f3b229fe7b2cd82048df5da930f70c7c3 # v1.4.4
35+
with:
36+
mode: artifact
37+
detect-replacements: 'true'
38+
duplicate-threshold: '4'
39+
dependency-threshold: '15'
40+
size-threshold: '200000'
41+
42+
- name: 📤 Upload artifact
43+
if: steps.analyze.outputs.artifact-path
44+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
45+
with:
46+
name: e18e-diff-result
47+
path: ${{ steps.analyze.outputs.artifact-path }}

0 commit comments

Comments
 (0)