-
Notifications
You must be signed in to change notification settings - Fork 525
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
858cbec
commit 69607af
Showing
1 changed file
with
43 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,43 @@ | ||
name: Sync CI | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 1 * *' # 每个月的第一天执行 | ||
|
||
jobs: | ||
sync: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout this repository | ||
uses: actions/checkout@v2 | ||
with: | ||
path: this | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Checkout official repository | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: zotero/translators | ||
path: official | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Copy CI related folders and files from official to this repository | ||
run: | | ||
cd this | ||
cp -rf ../official/.ci ./ | ||
cp -f ../official/.github/workflows/ci.yml ./.github/workflows/ci.yml | ||
cp -f ../official/.eslintrc ./.eslintrc | ||
cp -f ../official/index.d.ts ./index.d.ts | ||
cp -f ../official/jsconfig.json ./jsconfig.json | ||
cp -f ../official/package-lock.json ./package-lock.json | ||
cp -f ../official/package.json ./package.json | ||
- name: Commit and push changes to this repository | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
cwd: './this' | ||
author_name: GitHub Actions Bot | ||
author_email: actions@github.com | ||
message: 'Sync CI with official repository' |