Skip to content

Commit

Permalink
Add import:rc:ci command to package.json to import songs from RC, rep…
Browse files Browse the repository at this point in the history
…rocess filenames and content, and format the code.
  • Loading branch information
ioanlucut committed Oct 2, 2023
1 parent adc8e42 commit 33752c6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
30 changes: 29 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,37 @@ jobs:
CI: true
FORCE_COLOR: 2

AutoUpdateMeta:
AutoImportFromRC:
needs: Build
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x

- name: Install dependencies
run: npm i

- name: Import from RC (if not exists already)
run: |
npm run import:rc:ci
git config user.name github-actions
git config user.email [email protected]
git add -A
git diff --quiet && git diff --staged --quiet || git commit -am "[Bot] I have imported the 'resurse crestine' songs based on the 'rc_authors_to_process.txt' and 'rc_ids_to_process.txt'."
env:
CI: true
FORCE_COLOR: 2

AutoUpdateMeta:
needs: AutoImportFromRC
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"reprocess:filename": "node --no-warnings=ExperimentalWarning --loader ts-node/esm ./bin/lyricsFileNameReprocessorRunner.ts",
"import:rc:by-authors": "node --no-warnings=ExperimentalWarning --loader ts-node/esm ./temp-runners/importSongsFromRcByAuthors.ts",
"import:rc:by-ids": "node --no-warnings=ExperimentalWarning --loader ts-node/esm ./temp-runners/importSongsFromRcByIds.ts",
"import:rc:ci": "npm run import:rc:by-authors && npm run import:rc:by-ids",
"import:rc:ci": "npm run import:rc:by-authors && npm run import:rc:by-ids && npm run reprocess:filename && npm run reprocess:content && npm run format",
"build:ci": "npm run lint && npm run test && npm run verify",
"meta:ci": "npm run reprocess:filename && npm run reprocess:content && npm run verify && npm run format"
},
Expand Down

0 comments on commit 33752c6

Please sign in to comment.