Skip to content

Commit 9cf2d09

Browse files
committed
refactor: workflow to use github app
1 parent bf2f323 commit 9cf2d09

2 files changed

Lines changed: 191 additions & 59 deletions

File tree

.github/workflows/package-bump.yaml

Lines changed: 110 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -18,35 +18,41 @@ jobs:
1818
runs-on: ubuntu-latest
1919

2020
steps:
21-
- name: Package bump layer
22-
uses: InjectiveLabs/github-fe/actions/package-bump@master
21+
- name: Create GitHub App token
22+
id: app-token
23+
uses: actions/create-github-app-token@v1
2324
with:
24-
gh_token: ${{ secrets.LAYER_GH_TOKEN }}
25-
repository_url: injectiveLabs/injective-ui
26-
repository_branch: master
25+
app-id: ${{ vars.RELEASE_APP_ID }}
26+
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
27+
owner: InjectiveLabs
28+
repositories: injective-ui
2729

28-
package-bump-layer-tc:
29-
name: 'Package bump layer TC'
30-
runs-on: ubuntu-latest
31-
32-
steps:
33-
- name: Package bump layer TC
30+
- name: Package bump layer
3431
uses: InjectiveLabs/github-fe/actions/package-bump@master
3532
with:
36-
gh_token: ${{ secrets.LAYER_GH_TOKEN }}
33+
gh_token: ${{ steps.app-token.outputs.token }}
3734
repository_url: injectiveLabs/injective-ui
38-
repository_branch: feat/tc-layer
35+
repository_branch: master
3936

4037
package-bump-hub:
4138
name: 'Package bump hub'
4239
runs-on: ubuntu-latest
4340
needs: package-bump-layer
4441

4542
steps:
43+
- name: Create GitHub App token
44+
id: app-token
45+
uses: actions/create-github-app-token@v1
46+
with:
47+
app-id: ${{ vars.RELEASE_APP_ID }}
48+
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
49+
owner: InjectiveLabs
50+
repositories: injective-hub
51+
4652
- name: Package bump Hub
4753
uses: InjectiveLabs/github-fe/actions/package-bump@master
4854
with:
49-
gh_token: ${{ secrets.HUB_GH_TOKEN }}
55+
gh_token: ${{ steps.app-token.outputs.token }}
5056
repository_url: injectiveLabs/injective-hub
5157
repository_branch: dev
5258

@@ -56,10 +62,19 @@ jobs:
5662
needs: package-bump-layer
5763

5864
steps:
65+
- name: Create GitHub App token
66+
id: app-token
67+
uses: actions/create-github-app-token@v1
68+
with:
69+
app-id: ${{ vars.RELEASE_APP_ID }}
70+
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
71+
owner: InjectiveLabs
72+
repositories: injective-helix
73+
5974
- name: Package bump Helix
6075
uses: InjectiveLabs/github-fe/actions/package-bump@master
6176
with:
62-
gh_token: ${{ secrets.HELIX_GH_TOKEN }}
77+
gh_token: ${{ steps.app-token.outputs.token }}
6378
repository_url: injectiveLabs/injective-helix
6479
repository_branch: dev
6580

@@ -69,10 +84,19 @@ jobs:
6984
needs: package-bump-layer
7085

7186
steps:
87+
- name: Create GitHub App token
88+
id: app-token
89+
uses: actions/create-github-app-token@v1
90+
with:
91+
app-id: ${{ vars.RELEASE_APP_ID }}
92+
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
93+
owner: InjectiveLabs
94+
repositories: injective-explorer
95+
7296
- name: Package bump Explorer
7397
uses: InjectiveLabs/github-fe/actions/package-bump@master
7498
with:
75-
gh_token: ${{ secrets.EXPLORER_GH_TOKEN }}
99+
gh_token: ${{ steps.app-token.outputs.token }}
76100
repository_url: injectiveLabs/injective-explorer
77101
repository_branch: dev
78102

@@ -82,36 +106,62 @@ jobs:
82106
needs: package-bump-layer
83107

84108
steps:
109+
- name: Create GitHub App token
110+
id: app-token
111+
uses: actions/create-github-app-token@v1
112+
with:
113+
app-id: ${{ vars.RELEASE_APP_ID }}
114+
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
115+
owner: InjectiveLabs
116+
repositories: injective-trading-ui
117+
85118
- name: Package bump Trading UI
86119
uses: InjectiveLabs/github-fe/actions/package-bump@master
87120
with:
88-
gh_token: ${{ secrets.TRADING_UI_GH_TOKEN }}
121+
gh_token: ${{ steps.app-token.outputs.token }}
89122
repository_url: injectiveLabs/injective-trading-ui
90123
repository_branch: dev
91124

92-
package-bump-mito:
93-
name: 'Package bump Mito'
94-
runs-on: ubuntu-latest
95-
needs: package-bump-layer
96-
97-
steps:
98-
- name: Package bump Mito
99-
uses: InjectiveLabs/github-fe/actions/package-bump@master
100-
with:
101-
gh_token: ${{ secrets.MITO_GH_TOKEN }}
102-
repository_url: mitoFinance/mito-ui
103-
repository_branch: dev
125+
# package-bump-mito:
126+
# name: 'Package bump Mito'
127+
# runs-on: ubuntu-latest
128+
# needs: package-bump-layer
129+
130+
# steps:
131+
# - name: Create GitHub App token
132+
# id: app-token
133+
# uses: actions/create-github-app-token@v1
134+
# with:
135+
# app-id: ${{ vars.RELEASE_APP_ID }}
136+
# private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
137+
# owner: mitoFinance
138+
139+
# - name: Package bump Mito
140+
# uses: InjectiveLabs/github-fe/actions/package-bump@master
141+
# with:
142+
# gh_token: ${{ steps.app-token.outputs.token }}
143+
# repository_url: mitoFinance/mito-ui
144+
# repository_branch: dev
104145

105146
package-bump-ui-api:
106147
name: 'Package bump UI API'
107148
runs-on: ubuntu-latest
108149
needs: package-bump-layer
109150

110151
steps:
152+
- name: Create GitHub App token
153+
id: app-token
154+
uses: actions/create-github-app-token@v1
155+
with:
156+
app-id: ${{ vars.RELEASE_APP_ID }}
157+
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
158+
owner: InjectiveLabs
159+
repositories: injective-ui-api
160+
111161
- name: Package bump UI API
112162
uses: InjectiveLabs/github-fe/actions/package-bump@master
113163
with:
114-
gh_token: ${{ secrets.UI_API_GH_TOKEN }}
164+
gh_token: ${{ steps.app-token.outputs.token }}
115165
repository_url: injectiveLabs/injective-ui-api
116166
repository_branch: staging
117167

@@ -121,10 +171,19 @@ jobs:
121171
needs: package-bump-layer
122172

123173
steps:
174+
- name: Create GitHub App token
175+
id: app-token
176+
uses: actions/create-github-app-token@v1
177+
with:
178+
app-id: ${{ vars.RELEASE_APP_ID }}
179+
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
180+
owner: InjectiveLabs
181+
repositories: injective-admin-ui
182+
124183
- name: Package bump Admin UI
125184
uses: InjectiveLabs/github-fe/actions/package-bump@master
126185
with:
127-
gh_token: ${{ secrets.ADMIN_UI_GH_TOKEN }}
186+
gh_token: ${{ steps.app-token.outputs.token }}
128187
repository_url: InjectiveLabs/injective-admin-ui
129188
repository_branch: dev
130189

@@ -134,10 +193,19 @@ jobs:
134193
needs: package-bump-layer
135194

136195
steps:
196+
- name: Create GitHub App token
197+
id: app-token
198+
uses: actions/create-github-app-token@v1
199+
with:
200+
app-id: ${{ vars.RELEASE_APP_ID }}
201+
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
202+
owner: InjectiveLabs
203+
repositories: injective-do-ui
204+
137205
- name: Package bump DO UI
138206
uses: InjectiveLabs/github-fe/actions/package-bump@master
139207
with:
140-
gh_token: ${{ secrets.DO_UI_GH_TOKEN }}
208+
gh_token: ${{ steps.app-token.outputs.token }}
141209
repository_url: injectiveLabs/injective-do-ui
142210
repository_branch: master
143211

@@ -147,9 +215,18 @@ jobs:
147215
needs: package-bump-layer-tc
148216

149217
steps:
218+
- name: Create GitHub App token
219+
id: app-token
220+
uses: actions/create-github-app-token@v1
221+
with:
222+
app-id: ${{ vars.RELEASE_APP_ID }}
223+
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
224+
owner: InjectiveLabs
225+
repositories: injective-true-current
226+
150227
- name: Package bump True Current
151228
uses: InjectiveLabs/github-fe/actions/package-bump@master
152229
with:
153-
gh_token: ${{ secrets.TRUE_CURRENT_GH_TOKEN }}
230+
gh_token: ${{ steps.app-token.outputs.token }}
154231
repository_url: injectiveLabs/injective-true-current
155232
repository_branch: dev

0 commit comments

Comments
 (0)