Skip to content

Commit 2998826

Browse files
committed
chore: split it into tiny pieces of goodness
1 parent cb41e32 commit 2998826

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
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

.github/workflows/dependency-diff.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ concurrency:
1818

1919
permissions:
2020
contents: read
21-
pull-requests: write
2221

2322
jobs:
2423
dependency-diff:
@@ -31,9 +30,18 @@ jobs:
3130
fetch-depth: 0
3231

3332
- name: 🔎 Compare dependencies
33+
id: analyze
3434
uses: e18e/action-dependency-diff@d995338f3b229fe7b2cd82048df5da930f70c7c3 # v1.4.4
3535
with:
36+
mode: artifact
3637
detect-replacements: 'true'
3738
duplicate-threshold: '4'
3839
dependency-threshold: '15'
3940
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)