Skip to content

Commit

Permalink
add action
Browse files Browse the repository at this point in the history
  • Loading branch information
jiaojiaodubai committed Apr 17, 2024
1 parent 858cbec commit 7f018f6
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/syncCI.yml
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

- name: Checkout official repository
uses: actions/checkout@v2
with:
repository: zotero/translators
path: official

- 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'
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}

0 comments on commit 7f018f6

Please sign in to comment.