Skip to content

Commit d09fa5c

Browse files
committed
use GHA to commit and push
1 parent f7d226e commit d09fa5c

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

.github/workflows/update-api-reports.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,12 @@ jobs:
1919
node-version: 14.x
2020
- name: Yarn install
2121
run: yarn
22-
- name: git log before
23-
run: git log
2422
- name: Update API reports
2523
run: yarn ts-node-script scripts/exp/update-api-reports.ts
2624
id: update-api-reports
27-
- name: git log
28-
run: git log
2925
- name: Push changes
30-
uses: ad-m/[email protected]
31-
with:
32-
github_token: ${{ secrets.OSS_BOT_GITHUB_TOKEN }}
33-
branch: ${{ github.head_ref }}
26+
uses: EndBug/add-and-commit@v7
27+
with:
28+
add: 'common/api-review/*'
29+
message: 'Update API reports'
30+
default_author: github_actions

scripts/exp/update-api-reports.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,7 @@ async function updateApiReports() {
5454
}
5555
);
5656

57-
// stage api reviews
58-
await git.add('common/api-review/*');
59-
60-
// reset unrelated changes
61-
await git.checkout('.');
62-
63-
await git.commit('Update API reports');
64-
65-
// Pushing to the remote branch is done in the GHA workflow, see .github/workflows/update-api-reports.yml
57+
// Committing and Pushing to the remote branch is done in the GHA workflow, see .github/workflows/update-api-reports.yml
6658
}
6759

6860
updateApiReports();

0 commit comments

Comments
 (0)