-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sync): convert sync into a CLI to allow extendability (#162)
- Loading branch information
Showing
17 changed files
with
237 additions
and
223 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 |
---|---|---|
|
@@ -6,8 +6,8 @@ on: | |
branches: | ||
- main | ||
paths: | ||
- .github/workflows/sync-trustwallet-assets.yml | ||
- workspace/sync-trustwallet-assets/**/* | ||
- .github/workflows/sync.yml | ||
- workspace/sync/**/* | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
|
@@ -22,6 +22,11 @@ jobs: | |
main: | ||
runs-on: ubuntu-latest | ||
environment: FRONTMATTER_BOT | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
repo: | ||
- trustwallet/assets | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
|
@@ -33,14 +38,21 @@ jobs: | |
|
||
- run: pnpm install --frozen-lockfile | ||
|
||
- run: pnpm turbo run build | ||
working-directory: workspace/sync | ||
|
||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
path: workspace/sync-trustwallet-assets/repo | ||
repository: trustwallet/assets | ||
# PLEASE be aware that this is a security risk when you allow untrusted repositories to be checked out. | ||
# While `pnpm run sync` is executed such that we're only reading files which pose no security risk, | ||
# it's nonetheless possible through other means to execute arbitrary code | ||
# when you attempt to do "TOO MUCH" outside its intended use case. | ||
path: workspace/sync/repo | ||
repository: ${{ matrix.repo }} | ||
ref: master | ||
|
||
- run: pnpm turbo run sync | ||
working-directory: workspace/sync-trustwallet-assets | ||
- run: pnpm run sync ${{ matrix.repo }} | ||
working-directory: workspace/sync | ||
|
||
- id: app | ||
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0 | ||
|
@@ -51,13 +63,13 @@ jobs: | |
- uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2 | ||
with: | ||
token: ${{ steps.app.outputs.token }} | ||
commit-message: 'chore(sync): trustwallet/assets' | ||
title: 'chore(sync): trustwallet/assets' | ||
commit-message: 'chore(sync): ${{ matrix.repo }}' | ||
title: 'chore(sync): ${{ matrix.repo }}' | ||
committer: Frontmatter Bot <[email protected]> | ||
author: Frontmatter Bot <[email protected]> | ||
body: | | ||
#### What this PR does / why we need it: | ||
Sync latest changes from `trustwallet/assets` repository. | ||
Sync latest changes from `${{ matrix.repo }}` repository using `@workspace/sync`. | ||
branch: sync/trustwallet/assets | ||
branch: sync/${{ matrix.repo }} |
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 |
---|---|---|
@@ -1,4 +1 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 @@ | ||
/repo |
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
Oops, something went wrong.