-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: hxtree <[email protected]>
- Loading branch information
Showing
3 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Codegen | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
PR_NUMBER: | ||
required: true | ||
type: number | ||
secrets: | ||
USER_GITHUB_TOKEN: | ||
required: true | ||
jobs: | ||
rush-update: | ||
name: rush update | ||
timeout-minutes: 15 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.12.0' | ||
|
||
- name: Check out code base | ||
uses: actions/checkout@v3 | ||
|
||
- name: checkout code base | ||
run: gh pr checkout ${{ inputs.PR_NUMBER }} | ||
env: | ||
GH_TOKEN: ${{ secrets.USER_GITHUB_TOKEN }} | ||
|
||
- name: cache rush | ||
id: cache | ||
uses: actions/[email protected] | ||
with: | ||
path: common/temp | ||
key: ${{ runner.os }}-build-branch-${{ hashFiles('common/config/rush/repo-state.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-pr- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- name: rush install | ||
run: node common/scripts/install-run-rush.js install | ||
|
||
- name: rush build | ||
run: node common/scripts/install-run-rush.js build | ||
|
||
- name: rush update | ||
run: node common/scripts/install-run-rush.js update | ||
|
||
- name: push changes | ||
run: | | ||
npm install --global lint-staged | ||
npm install --global prettier | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "dependabot[bot]" | ||
git add . | ||
git commit -m 'chore(deps): update shrinkwrap' | ||
git push | ||
env: | ||
GH_TOKEN: ${{ secrets.USER_GITHUB_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters