Skip to content

Commit 10617e6

Browse files
committed
rename the secret to GH_PUSH_TOKEN
1 parent cf252ae commit 10617e6

File tree

2 files changed

+39
-29
lines changed

2 files changed

+39
-29
lines changed

.github/workflows/cd.yml

Lines changed: 38 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,37 +13,36 @@ 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'
27-
run: |
28-
git config --global user.email "noreply@onesignal.com"
29-
git config --global user.name "OneSignal"
30-
env:
31-
GITHUB_TOKEN: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
27+
uses: OneSignal/sdk-actions/.github/actions/setup-git-user@main
28+
3229
- name: 'Get current web-shim-codegen version'
3330
run: |
3431
echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
32+
3533
- name: '[Setup] Build'
3634
run: npm run build
35+
3736
- name: '[onesignal-ngx] Checkout'
38-
uses: actions/checkout@v3
37+
uses: actions/checkout@v6
3938
with:
40-
token: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
39+
token: ${{ secrets.GH_PUSH_TOKEN }}
4140
repository: OneSignal/onesignal-ngx
4241
fetch-depth: 0
4342
path: __clone/onesignal-ngx
43+
4444
- name: '[onesignal-ngx] Patch'
4545
run: |
46-
bash scripts/clean-repo.sh __clone/onesignal-ngx package-lock.json
4746
tar zxvvf dist/onesignal-ngx.tgz -C __clone/
4847
cd __clone/onesignal-ngx
4948
git add -A
@@ -52,14 +51,16 @@ jobs:
5251
else
5352
echo "onesignal-ngx repository has NOT been updated, no changes to commit"
5453
fi
54+
5555
- name: '[onesignal-ngx] Push'
5656
uses: ad-m/github-push-action@v0.6.0
5757
with:
5858
repository: OneSignal/onesignal-ngx
5959
directory: __clone/onesignal-ngx
6060
force: true
6161
branch: cd_update
62-
github_token: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
62+
github_token: ${{ secrets.GH_PUSH_TOKEN }}
63+
6364
- name: '[onesignal-ngx] Submit PR'
6465
uses: octokit/request-action@v2.x
6566
continue-on-error: true
@@ -72,18 +73,19 @@ jobs:
7273
title: 'sync with web-shim-codegen v${{ env.PACKAGE_VERSION }}'
7374
body: 'This update was generated by the GitHub CD action.'
7475
env:
75-
GITHUB_TOKEN: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
76+
GITHUB_TOKEN: ${{ secrets.GH_PUSH_TOKEN }}
77+
7678
- name: '[react-onesignal] Checkout'
7779
uses: actions/checkout@v3
7880
with:
79-
token: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
81+
token: ${{ secrets.GH_PUSH_TOKEN }}
8082
repository: OneSignal/react-onesignal
8183
fetch-depth: 0
8284
submodules: true
8385
path: __clone/react
86+
8487
- name: '[react-onesignal] Patch'
8588
run: |
86-
bash scripts/clean-repo.sh __clone/react
8789
tar zxvvf dist/react.tgz -C __clone/
8890
cd __clone/react
8991
git add -A
@@ -92,14 +94,16 @@ jobs:
9294
else
9395
echo "react-onesignal repository has NOT been updated, no changes to commit"
9496
fi
97+
9598
- name: '[react-onesignal] Push'
9699
uses: ad-m/github-push-action@v0.6.0
97100
with:
98101
repository: OneSignal/react-onesignal
99102
directory: __clone/react
100103
force: true
101104
branch: cd_update
102-
github_token: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
105+
github_token: ${{ secrets.GH_PUSH_TOKEN }}
106+
103107
- name: '[react-onesignal] Submit PR'
104108
uses: octokit/request-action@v2.x
105109
continue-on-error: true
@@ -112,17 +116,18 @@ jobs:
112116
title: 'sync with web-shim-codegen v${{ env.PACKAGE_VERSION }}'
113117
body: 'This update was generated by the GitHub CD action.'
114118
env:
115-
GITHUB_TOKEN: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
119+
GITHUB_TOKEN: ${{ secrets.GH_PUSH_TOKEN }}
120+
116121
- name: '[onesignal-vue] Checkout'
117122
uses: actions/checkout@v3
118123
with:
119-
token: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
124+
token: ${{ secrets.GH_PUSH_TOKEN }}
120125
repository: OneSignal/onesignal-vue
121126
fetch-depth: 0
122127
path: __clone/vue/v2
128+
123129
- name: '[onesignal-vue] Patch'
124130
run: |
125-
bash scripts/clean-repo.sh __clone/vue/v2
126131
tar zxvvf dist/vue/v2.tgz -C __clone/
127132
cd __clone/vue/v2
128133
git add -A
@@ -131,14 +136,16 @@ jobs:
131136
else
132137
echo "onesignal-vue repository has NOT been updated, no changes to commit"
133138
fi
139+
134140
- name: '[onesignal-vue] Push'
135141
uses: ad-m/github-push-action@v0.6.0
136142
with:
137143
repository: OneSignal/onesignal-vue
138144
directory: __clone/vue/v2
139145
force: true
140146
branch: cd_update
141-
github_token: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
147+
github_token: ${{ secrets.GH_PUSH_TOKEN }}
148+
142149
- name: '[onesignal-vue] Submit PR'
143150
uses: octokit/request-action@v2.x
144151
continue-on-error: true
@@ -151,17 +158,18 @@ jobs:
151158
title: 'sync with web-shim-codegen v${{ env.PACKAGE_VERSION }}'
152159
body: 'This update was generated by the GitHub CD action.'
153160
env:
154-
GITHUB_TOKEN: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
161+
GITHUB_TOKEN: ${{ secrets.GH_PUSH_TOKEN }}
162+
155163
- name: '[onesignal-vue3] Checkout'
156164
uses: actions/checkout@v3
157165
with:
158-
token: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
166+
token: ${{ secrets.GH_PUSH_TOKEN }}
159167
repository: OneSignal/onesignal-vue3
160168
fetch-depth: 0
161169
path: __clone/vue/v3
170+
162171
- name: '[onesignal-vue3] Patch'
163172
run: |
164-
bash scripts/clean-repo.sh __clone/vue/v3
165173
tar zxvvf dist/vue/v3.tgz -C __clone/
166174
cd __clone/vue/v3
167175
git add -A
@@ -170,14 +178,16 @@ jobs:
170178
else
171179
echo "onesignal-vue3 repository has NOT been updated, no changes to commit"
172180
fi
181+
173182
- name: '[onesignal-vue3] Push'
174183
uses: ad-m/github-push-action@v0.6.0
175184
with:
176185
repository: OneSignal/onesignal-vue3
177186
directory: __clone/vue/v3
178187
force: true
179188
branch: cd_update
180-
github_token: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
189+
github_token: ${{ secrets.GH_PUSH_TOKEN }}
190+
181191
- name: '[onesignal-vue3] Submit PR'
182192
uses: octokit/request-action@v2.x
183193
continue-on-error: true
@@ -190,4 +200,4 @@ jobs:
190200
title: 'sync with web-shim-codegen v${{ env.PACKAGE_VERSION }}'
191201
body: 'This update was generated by the GitHub CD action.'
192202
env:
193-
GITHUB_TOKEN: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
203+
GITHUB_TOKEN: ${{ secrets.GH_PUSH_TOKEN }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "web-shim-codegen",
3-
"version": "3.0.6",
3+
"version": "3.0.7",
44
"description": "Used to build Web SDK libraries for various web frameworks",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)