File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change 41
41
- name : Build dist/ Directory
42
42
run : npm run bundle
43
43
44
- # This will fail the workflow if the PR wasn't created by Dependabot.
44
+ # This will fail the workflow if the `dist/` directory is different than
45
+ # expected.
45
46
- name : Compare Directories
46
47
id : diff
47
48
run : |
51
52
exit 1
52
53
fi
53
54
54
- # If `dist/` was different than expected, and this was not a Dependabot
55
- # PR, upload the expected version as a workflow artifact.
56
- - if : ${{ failure() && steps.diff.outcome == 'failure' }}
55
+ # If `dist` was different and this is a renovate commit, push the changes.
56
+ - if : ${{ failure() && steps.diff.outcome == 'failure' && github.actor == 'renovate[bot]' }}
57
+ name : Commit /dist Directory
58
+ uses : EndBug/add-and-commit@v9
59
+ with :
60
+ add : dist
61
+ default_author : github_actions
62
+ fetch : false
63
+ message : " Rebuild Action"
64
+ pathspec_error_handling : exitImmediately
65
+
66
+ # If `dist/` was different than expected, upload the expected version as a
67
+ # workflow artifact.
68
+ - if : ${{ failure() && steps.diff.outcome == 'failure' && github.actor != 'renovate[bot]' }}
57
69
name : Upload Artifact
58
70
uses : actions/upload-artifact@v4
59
71
with :
You can’t perform that action at this time.
0 commit comments