Add Sync-Resource-CI (#7186)

This commit is contained in:
北雁 Cryolitia
2023-11-04 03:55:46 +08:00
committed by GitHub
parent 9c1c4b05e7
commit 09dc337c35

35
.github/workflows/sync-resource.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
on:
push:
branches:
- dev
paths:
- 'resource/**'
- '.github/workflows/sync-resource.yml'
jobs:
sync-reource:
runs-on: ubuntu-latest
steps:
- name: Checkout MaaAssistantArknights
uses: actions/checkout@v4.1.1
- name: Setup Git
run: |
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
git show -s
- name: Checkout MaaResource
uses: actions/checkout@v4.1.1
with:
repository: MaaAssistantArknights/MaaResource
ssh-key: ${{secrets.MAA_RESOURCE_DEPLOY}}
path: MaaResource
- name: Update MaaResource
run: |
cp -rf resource/* MaaResource
export commit_msg=$(git show -s --format=%s)
cd MaaResource
git add .
git status
git commit -m "$commit_msg"
git push