Skip to content

Commit 3489534

Browse files
fix: get trees recursively (#10)
* feat: log out updated modules * fix: get trees recursively * ci: commit build as actions user, don't run on push * chore: build Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 93b7abb commit 3489534

File tree

5 files changed

+19
-2
lines changed

5 files changed

+19
-2
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,20 @@ name: Test & Build
22

33
on:
44
pull_request:
5-
push:
65

76
jobs:
87
build:
98
runs-on: ubuntu-latest
109
steps:
1110
- uses: actions/checkout@v2
11+
with:
12+
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
1213
- run: yarn
1314
- run: yarn lint
1415
- run: yarn build
1516
- uses: stefanzweifel/git-auto-commit-action@v4
1617
with:
1718
commit_message: 'chore: build'
1819
commit_author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
20+
commit_user_name: github-actions[bot]
21+
commit_user_email: 41898282+github-actions[bot]@users.noreply.github.com>

dist/index.js

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/allModules.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export async function getAllModules(token: string): Promise<string[]> {
2626
owner: context.repo.owner,
2727
repo: context.repo.repo,
2828
tree_sha: head,
29+
recursive: 'true',
2930
})
3031

3132
if (response.status !== 200) {

src/main.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ async function run(): Promise<void> {
2222
throw new Error(`Unknown mode: ${mode}`)
2323
}
2424

25+
if (modules.length) {
26+
core.debug(`Found modules:${modules.map((module) => `\n- ${module}`)}`)
27+
} else {
28+
core.debug('No modules found')
29+
}
30+
2531
core.setOutput('modules', modules)
2632
} catch (error) {
2733
core.setFailed(error.message)

0 commit comments

Comments
 (0)