@@ -13,53 +13,51 @@ jobs:
1313 runs-on : ubuntu-latest
1414 steps :
1515 - name : ' [Setup] Checkout Repository'
16- uses : actions/checkout@v3
17- with :
18- persist-credentials : false
19- token : ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
16+ uses : actions/checkout@v6
17+
2018 - name : ' [Setup] Node'
21- uses : actions/setup-node@v3
19+ uses : actions/setup-node@v6
2220 with :
2321 node-version : 18
22+
2423 - name : ' [Setup] Bootstrap Dependencies'
25- run : bash scripts/bootstrap-dependencies
24+ run : npm ci
25+
2626 - name : ' [Setup] Git'
2727 run : |
2828 git config --global user.email "noreply@onesignal.com"
2929 git config --global user.name "OneSignal"
30- env :
31- GITHUB_TOKEN : ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
30+
3231 - name : ' Get current web-shim-codegen version'
3332 run : |
3433 echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
34+
3535 - name : ' [Setup] Build'
3636 run : npm run build
37+
3738 - name : ' [onesignal-ngx] Checkout'
38- uses : actions/checkout@v3
39+ uses : actions/checkout@v6
3940 with :
40- token : ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
41+ token : ${{ secrets.GH_PUSH_TOKEN }}
4142 repository : OneSignal/onesignal-ngx
4243 fetch-depth : 0
4344 path : __clone/onesignal-ngx
45+
4446 - name : ' [onesignal-ngx] Patch'
4547 run : |
46- bash scripts/clean-repo.sh __clone/onesignal-ngx package-lock.json
47- tar zxvvf dist/onesignal-ngx.tgz -C __clone/
48- cd __clone/onesignal-ngx
49- git add -A
50- if git commit -m "feat: sync with web-shim-codegen v${{ env.PACKAGE_VERSION }}"; then
51- echo "onesignal-ngx repository has been updated"
52- else
53- echo "onesignal-ngx repository has NOT been updated, no changes to commit"
54- fi
48+ bash scripts/patch-repo.sh dist/onesignal-ngx.tgz __clone/onesignal-ngx onesignal-ngx
49+ env :
50+ PACKAGE_VERSION : ${{ env.PACKAGE_VERSION }}
51+
5552 - name : ' [onesignal-ngx] Push'
5653 uses : ad-m/github-push-action@v0.6.0
5754 with :
5855 repository : OneSignal/onesignal-ngx
5956 directory : __clone/onesignal-ngx
6057 force : true
6158 branch : cd_update
62- github_token : ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
59+ github_token : ${{ secrets.GH_PUSH_TOKEN }}
60+
6361 - name : ' [onesignal-ngx] Submit PR'
6462 uses : octokit/request-action@v2.x
6563 continue-on-error : true
@@ -72,34 +70,32 @@ jobs:
7270 title : ' sync with web-shim-codegen v${{ env.PACKAGE_VERSION }}'
7371 body : ' This update was generated by the GitHub CD action.'
7472 env :
75- GITHUB_TOKEN : ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
73+ GITHUB_TOKEN : ${{ secrets.GH_PUSH_TOKEN }}
74+
7675 - name : ' [react-onesignal] Checkout'
7776 uses : actions/checkout@v3
7877 with :
79- token : ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
78+ token : ${{ secrets.GH_PUSH_TOKEN }}
8079 repository : OneSignal/react-onesignal
8180 fetch-depth : 0
8281 submodules : true
8382 path : __clone/react
83+
8484 - name : ' [react-onesignal] Patch'
8585 run : |
86- bash scripts/clean-repo.sh __clone/react
87- tar zxvvf dist/react.tgz -C __clone/
88- cd __clone/react
89- git add -A
90- if git commit -m "feat: sync with web-shim-codegen v${{ env.PACKAGE_VERSION }}"; then
91- echo "react-onesignal repository has been updated"
92- else
93- echo "react-onesignal repository has NOT been updated, no changes to commit"
94- fi
86+ bash scripts/patch-repo.sh dist/react.tgz __clone/react react-onesignal
87+ env :
88+ PACKAGE_VERSION : ${{ env.PACKAGE_VERSION }}
89+
9590 - name : ' [react-onesignal] Push'
9691 uses : ad-m/github-push-action@v0.6.0
9792 with :
9893 repository : OneSignal/react-onesignal
9994 directory : __clone/react
10095 force : true
10196 branch : cd_update
102- github_token : ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
97+ github_token : ${{ secrets.GH_PUSH_TOKEN }}
98+
10399 - name : ' [react-onesignal] Submit PR'
104100 uses : octokit/request-action@v2.x
105101 continue-on-error : true
@@ -112,33 +108,31 @@ jobs:
112108 title : ' sync with web-shim-codegen v${{ env.PACKAGE_VERSION }}'
113109 body : ' This update was generated by the GitHub CD action.'
114110 env :
115- GITHUB_TOKEN : ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
111+ GITHUB_TOKEN : ${{ secrets.GH_PUSH_TOKEN }}
112+
116113 - name : ' [onesignal-vue] Checkout'
117114 uses : actions/checkout@v3
118115 with :
119- token : ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
116+ token : ${{ secrets.GH_PUSH_TOKEN }}
120117 repository : OneSignal/onesignal-vue
121118 fetch-depth : 0
122119 path : __clone/vue/v2
120+
123121 - name : ' [onesignal-vue] Patch'
124122 run : |
125- bash scripts/clean-repo.sh __clone/vue/v2
126- tar zxvvf dist/vue/v2.tgz -C __clone/
127- cd __clone/vue/v2
128- git add -A
129- if git commit -m "feat: sync with web-shim-codegen v${{ env.PACKAGE_VERSION }}"; then
130- echo "onesignal-vue repository has been updated"
131- else
132- echo "onesignal-vue repository has NOT been updated, no changes to commit"
133- fi
123+ bash scripts/patch-repo.sh dist/vue/v2.tgz __clone/vue/v2 onesignal-vue
124+ env :
125+ PACKAGE_VERSION : ${{ env.PACKAGE_VERSION }}
126+
134127 - name : ' [onesignal-vue] Push'
135128 uses : ad-m/github-push-action@v0.6.0
136129 with :
137130 repository : OneSignal/onesignal-vue
138131 directory : __clone/vue/v2
139132 force : true
140133 branch : cd_update
141- github_token : ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
134+ github_token : ${{ secrets.GH_PUSH_TOKEN }}
135+
142136 - name : ' [onesignal-vue] Submit PR'
143137 uses : octokit/request-action@v2.x
144138 continue-on-error : true
@@ -151,33 +145,31 @@ jobs:
151145 title : ' sync with web-shim-codegen v${{ env.PACKAGE_VERSION }}'
152146 body : ' This update was generated by the GitHub CD action.'
153147 env :
154- GITHUB_TOKEN : ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
148+ GITHUB_TOKEN : ${{ secrets.GH_PUSH_TOKEN }}
149+
155150 - name : ' [onesignal-vue3] Checkout'
156151 uses : actions/checkout@v3
157152 with :
158- token : ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
153+ token : ${{ secrets.GH_PUSH_TOKEN }}
159154 repository : OneSignal/onesignal-vue3
160155 fetch-depth : 0
161156 path : __clone/vue/v3
157+
162158 - name : ' [onesignal-vue3] Patch'
163159 run : |
164- bash scripts/clean-repo.sh __clone/vue/v3
165- tar zxvvf dist/vue/v3.tgz -C __clone/
166- cd __clone/vue/v3
167- git add -A
168- if git commit -m "feat: sync with web-shim-codegen v${{ env.PACKAGE_VERSION }}"; then
169- echo "onesignal-vue3 repository has been updated"
170- else
171- echo "onesignal-vue3 repository has NOT been updated, no changes to commit"
172- fi
160+ bash scripts/patch-repo.sh dist/vue/v3.tgz __clone/vue/v3 onesignal-vue3
161+ env :
162+ PACKAGE_VERSION : ${{ env.PACKAGE_VERSION }}
163+
173164 - name : ' [onesignal-vue3] Push'
174165 uses : ad-m/github-push-action@v0.6.0
175166 with :
176167 repository : OneSignal/onesignal-vue3
177168 directory : __clone/vue/v3
178169 force : true
179170 branch : cd_update
180- github_token : ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
171+ github_token : ${{ secrets.GH_PUSH_TOKEN }}
172+
181173 - name : ' [onesignal-vue3] Submit PR'
182174 uses : octokit/request-action@v2.x
183175 continue-on-error : true
@@ -190,4 +182,4 @@ jobs:
190182 title : ' sync with web-shim-codegen v${{ env.PACKAGE_VERSION }}'
191183 body : ' This update was generated by the GitHub CD action.'
192184 env :
193- GITHUB_TOKEN : ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
185+ GITHUB_TOKEN : ${{ secrets.GH_PUSH_TOKEN }}
0 commit comments