Skip to content

Commit 274a7ac

Browse files
committed
rename the secret to GH_PUSH_TOKEN
1 parent cf252ae commit 274a7ac

File tree

1 file changed

+38
-24
lines changed

1 file changed

+38
-24
lines changed

.github/workflows/cd.yml

Lines changed: 38 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,34 @@ 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: |
4646
bash scripts/clean-repo.sh __clone/onesignal-ngx package-lock.json
@@ -52,14 +52,16 @@ jobs:
5252
else
5353
echo "onesignal-ngx repository has NOT been updated, no changes to commit"
5454
fi
55+
5556
- name: '[onesignal-ngx] Push'
5657
uses: ad-m/github-push-action@v0.6.0
5758
with:
5859
repository: OneSignal/onesignal-ngx
5960
directory: __clone/onesignal-ngx
6061
force: true
6162
branch: cd_update
62-
github_token: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
63+
github_token: ${{ secrets.GH_PUSH_TOKEN }}
64+
6365
- name: '[onesignal-ngx] Submit PR'
6466
uses: octokit/request-action@v2.x
6567
continue-on-error: true
@@ -72,15 +74,17 @@ jobs:
7274
title: 'sync with web-shim-codegen v${{ env.PACKAGE_VERSION }}'
7375
body: 'This update was generated by the GitHub CD action.'
7476
env:
75-
GITHUB_TOKEN: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
77+
GITHUB_TOKEN: ${{ secrets.GH_PUSH_TOKEN }}
78+
7679
- name: '[react-onesignal] Checkout'
7780
uses: actions/checkout@v3
7881
with:
79-
token: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
82+
token: ${{ secrets.GH_PUSH_TOKEN }}
8083
repository: OneSignal/react-onesignal
8184
fetch-depth: 0
8285
submodules: true
8386
path: __clone/react
87+
8488
- name: '[react-onesignal] Patch'
8589
run: |
8690
bash scripts/clean-repo.sh __clone/react
@@ -92,14 +96,16 @@ jobs:
9296
else
9397
echo "react-onesignal repository has NOT been updated, no changes to commit"
9498
fi
99+
95100
- name: '[react-onesignal] Push'
96101
uses: ad-m/github-push-action@v0.6.0
97102
with:
98103
repository: OneSignal/react-onesignal
99104
directory: __clone/react
100105
force: true
101106
branch: cd_update
102-
github_token: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
107+
github_token: ${{ secrets.GH_PUSH_TOKEN }}
108+
103109
- name: '[react-onesignal] Submit PR'
104110
uses: octokit/request-action@v2.x
105111
continue-on-error: true
@@ -112,14 +118,16 @@ jobs:
112118
title: 'sync with web-shim-codegen v${{ env.PACKAGE_VERSION }}'
113119
body: 'This update was generated by the GitHub CD action.'
114120
env:
115-
GITHUB_TOKEN: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
121+
GITHUB_TOKEN: ${{ secrets.GH_PUSH_TOKEN }}
122+
116123
- name: '[onesignal-vue] Checkout'
117124
uses: actions/checkout@v3
118125
with:
119-
token: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
126+
token: ${{ secrets.GH_PUSH_TOKEN }}
120127
repository: OneSignal/onesignal-vue
121128
fetch-depth: 0
122129
path: __clone/vue/v2
130+
123131
- name: '[onesignal-vue] Patch'
124132
run: |
125133
bash scripts/clean-repo.sh __clone/vue/v2
@@ -131,14 +139,16 @@ jobs:
131139
else
132140
echo "onesignal-vue repository has NOT been updated, no changes to commit"
133141
fi
142+
134143
- name: '[onesignal-vue] Push'
135144
uses: ad-m/github-push-action@v0.6.0
136145
with:
137146
repository: OneSignal/onesignal-vue
138147
directory: __clone/vue/v2
139148
force: true
140149
branch: cd_update
141-
github_token: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
150+
github_token: ${{ secrets.GH_PUSH_TOKEN }}
151+
142152
- name: '[onesignal-vue] Submit PR'
143153
uses: octokit/request-action@v2.x
144154
continue-on-error: true
@@ -151,14 +161,16 @@ jobs:
151161
title: 'sync with web-shim-codegen v${{ env.PACKAGE_VERSION }}'
152162
body: 'This update was generated by the GitHub CD action.'
153163
env:
154-
GITHUB_TOKEN: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
164+
GITHUB_TOKEN: ${{ secrets.GH_PUSH_TOKEN }}
165+
155166
- name: '[onesignal-vue3] Checkout'
156167
uses: actions/checkout@v3
157168
with:
158-
token: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
169+
token: ${{ secrets.GH_PUSH_TOKEN }}
159170
repository: OneSignal/onesignal-vue3
160171
fetch-depth: 0
161172
path: __clone/vue/v3
173+
162174
- name: '[onesignal-vue3] Patch'
163175
run: |
164176
bash scripts/clean-repo.sh __clone/vue/v3
@@ -170,14 +182,16 @@ jobs:
170182
else
171183
echo "onesignal-vue3 repository has NOT been updated, no changes to commit"
172184
fi
185+
173186
- name: '[onesignal-vue3] Push'
174187
uses: ad-m/github-push-action@v0.6.0
175188
with:
176189
repository: OneSignal/onesignal-vue3
177190
directory: __clone/vue/v3
178191
force: true
179192
branch: cd_update
180-
github_token: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
193+
github_token: ${{ secrets.GH_PUSH_TOKEN }}
194+
181195
- name: '[onesignal-vue3] Submit PR'
182196
uses: octokit/request-action@v2.x
183197
continue-on-error: true
@@ -190,4 +204,4 @@ jobs:
190204
title: 'sync with web-shim-codegen v${{ env.PACKAGE_VERSION }}'
191205
body: 'This update was generated by the GitHub CD action.'
192206
env:
193-
GITHUB_TOKEN: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }}
207+
GITHUB_TOKEN: ${{ secrets.GH_PUSH_TOKEN }}

0 commit comments

Comments
 (0)