@@ -11,31 +11,47 @@ jobs:
11
11
steps :
12
12
- name : Checkout Repo
13
13
uses : actions/checkout@master
14
- - name : Get the list of modified files only
14
+ - name : Get the list of modified installers only
15
15
uses : technote-space/get-diff-action@v1
16
16
with :
17
17
PREFIX_FILTER : |
18
18
installers
19
19
- name : Generate installers, update README.md & installers.toml
20
- run : ./generate.sh ${{ env.GIT_DIFF }}
21
20
if : env.GIT_DIFF
21
+ run : ./generate.sh ${{ env.GIT_DIFF }}
22
22
- name : Minify generated installers
23
+ if : env.GIT_DIFF
23
24
run : ./minify.sh ${{ env.GIT_DIFF }}
25
+ - name : Find the Related PR
24
26
if : env.GIT_DIFF
27
+ uses : jwalton/gh-find-current-pr@v1
28
+ id : findPr
29
+ with :
30
+ github-token : ${{ secrets.GITHUB_TOKEN }}
31
+ - name : Related PR
32
+ if : env.GIT_DIFF && success() && steps.findPr.outputs.number
33
+ id : vars
34
+ run : |
35
+ echo "The related PR is ${PR}"
36
+ echo ::set-output name=pr_body::"#${PR}"
37
+ env :
38
+ PR : ${{ steps.findPr.outputs.pr }}
25
39
- name : Create a pull request for README.md & installers.toml updates
40
+ if : env.GIT_DIFF
26
41
uses : peter-evans/create-pull-request@v3
27
42
with :
28
43
commit-message : update README.md & installers.toml
29
- title : Update README.md & installers.toml
30
- body : Update README.md & installers.toml for the changes to the installer scripts
44
+ title : Update installer scrits, README.md & installers.toml
45
+ body : |
46
+ Update README.md & installers.toml for the changes to the installer scripts.
47
+ This is a generated PR in related to PR ${{ steps.vars.outputs.pr_body }}
31
48
branch : update-readme-md-and-installers-toml
32
- if : env.GIT_DIFF
33
49
- name : Archive Production Artifact
50
+ if : env.GIT_DIFF
34
51
uses : actions/upload-artifact@master
35
52
with :
36
53
name : installers
37
54
path : installers
38
- if : env.GIT_DIFF
39
55
40
56
deploy :
41
57
name : Deploy
@@ -44,11 +60,17 @@ jobs:
44
60
steps :
45
61
- name : Checkout Repo
46
62
uses : actions/checkout@master
63
+ - name : Get the list of modified installers only
64
+ uses : technote-space/get-diff-action@v1
65
+ with :
66
+ PREFIX_FILTER : |
67
+ installers
47
68
- name : Download Artifact
48
69
uses : actions/download-artifact@master
49
70
with :
50
71
name : installers
51
72
path : installers
73
+ if : env.GIT_DIFF
52
74
- name : Install Dependencies
53
75
run : cd functions && npm install
54
76
- name : Deploy to Firebase
0 commit comments