File tree Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -24,16 +24,19 @@ concurrency:
24
24
group : " publish-wiki"
25
25
cancel-in-progress : false
26
26
27
- permissions :
28
- contents : write
29
-
30
27
jobs :
31
28
publish-wiki :
32
29
name : " Publish Wiki"
33
30
if : github.repository == 'PHPCSStandards/PHP_CodeSniffer-documentation'
34
31
35
32
runs-on : ubuntu-latest
36
33
34
+ permissions :
35
+ # Needed for the commit to the wiki.
36
+ contents : write
37
+ # Needed for the PR comment.
38
+ pull-requests : write
39
+
37
40
steps :
38
41
- name : Checkout code
39
42
uses : actions/checkout@v4
@@ -56,13 +59,29 @@ jobs:
56
59
# is updated. All in all, no need to keep the artifact for more than a few days.
57
60
- name : " [PR only] Upload the preprocessed wiki files as an artifact"
58
61
if : ${{ github.event_name == 'pull_request' }}
62
+ id : artifact
59
63
uses : actions/upload-artifact@v4
60
64
with :
61
65
name : wiki-files
62
66
path : ./_wiki
63
67
if-no-files-found : error
64
68
retention-days : 10
65
69
70
+ - name : " [PR only] Post comment to review artifact if workflow was updated"
71
+ if : ${{ github.event_name == 'pull_request' }}
72
+ uses : mshick/add-pr-comment@v2
73
+ with :
74
+ # TODO: replace this with PAT
75
+ repo-token : ${{ secrets.PHPCS_GITHUB_TOKEN }}
76
+ message : |
77
+ Thank you for this PR.
78
+ A dry-run has been executed on your PR, executing all markdown pre-processing for the wiki files.
79
+
80
+ Please review the resulting final markdown files via the [created artifact](${{ steps.artifact.outputs.artifact-url }}).
81
+ This is especially important when adding new pages or updating auto-generated output blocks.
82
+
83
+ _N.B.: the above link will automatically be updated when this PR is updated._
84
+
66
85
- name : Check GitHub Git Operations status
67
86
uses : crazy-max/ghaction-github-status@v4
68
87
with :
You can’t perform that action at this time.
0 commit comments