mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 01:40:46 +08:00
Bumps the github-actions group in /.github/workflows with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [softprops/action-gh-release](https://github.com/softprops/action-gh-release). Updates `actions/checkout` from 6 to 7 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v6...v7) Updates `softprops/action-gh-release` from 3.0.0 to 3.0.1 - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](https://github.com/softprops/action-gh-release/compare/v3.0.0...v3.0.1) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: softprops/action-gh-release dependency-version: 3.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
53 lines
1.2 KiB
YAML
53 lines
1.2 KiB
YAML
name: Resource Sync
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- dev-v2
|
|
paths:
|
|
- ".github/workflows/sync-resource.yml"
|
|
- "resource/**"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
sync-resource:
|
|
name: Sync Resource to MaaResource
|
|
if: github.repository_owner == 'MaaAssistantArknights'
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v7
|
|
with:
|
|
show-progress: false
|
|
|
|
- name: Configure git
|
|
run: |
|
|
git config --global user.name 'github-actions[bot]'
|
|
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
|
git show -s
|
|
|
|
- name: Checkout MaaResource
|
|
uses: actions/checkout@v7
|
|
with:
|
|
repository: MaaAssistantArknights/MaaResource
|
|
show-progress: false
|
|
ssh-key: ${{secrets.MAA_RESOURCE_DEPLOY}}
|
|
path: MaaResource
|
|
|
|
- name: Update MaaResource
|
|
run: |
|
|
export commit_msg=$(git show -s --format=%s)
|
|
cd MaaResource
|
|
shopt -s extglob
|
|
|
|
cd resource
|
|
rm -rf !(".gitignore")
|
|
cp -rf ../../resource/* .
|
|
cd ..
|
|
|
|
git add .
|
|
git status
|
|
git commit -m "$commit_msg" || exit 0
|
|
git push
|