Some checks failed
tj-sync-to-github / build (push) Has started running
az-vnr-patch-sync-to-github / build (push) Successful in 4s
sr-sync-to-github / build (push) Failing after 14s
az-more-slots-sync-to-github / build (push) Successful in 3s
53 lines
1.4 KiB
YAML
53 lines
1.4 KiB
YAML
name: tj-sync-to-github
|
|
run-name:
|
|
on:
|
|
schedule:
|
|
- cron: '5 */3 * * *'
|
|
issues:
|
|
types: [opened]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: clone
|
|
run: |
|
|
git clone https://x-access-token:${{ secrets.ACCESS_TOKEN }}@git.azw.net.cn/azurlane-hoi4/azurlane-tj.git
|
|
ls -lh
|
|
- name: tj
|
|
run: |
|
|
git clone https://github.com/Azurlane-HOI-mod/Azurlane-TJ.git
|
|
ls -lh
|
|
cd Azurlane-TJ
|
|
ls -lh
|
|
git checkout master
|
|
rm -rf src
|
|
rm -rf README
|
|
mv ../azurlane-tj/src .
|
|
mv ../azurlane-tj/README .
|
|
git config --local user.email Cheshire[bot]@users.noreply.github.com
|
|
git config --local user.name 柴郡[bot]
|
|
- name: check diff
|
|
id: check_changes
|
|
run: |
|
|
ls -lh
|
|
cd Azurlane-TJ
|
|
ls -lh
|
|
if [ -z "$(git status --porcelain)" ]; then
|
|
echo "::set-output name=has_changes::false"
|
|
else
|
|
echo "::set-output name=has_changes::true"
|
|
fi
|
|
- name: push
|
|
if: ${{ steps.check_changes.outputs.has_changes == 'true' }}
|
|
run: |
|
|
ls -lh
|
|
cd Azurlane-TJ
|
|
ls -lh
|
|
git add .
|
|
git commit --allow-empty -m "$(date '+%Y-%m-%d %H:%M:%S')"
|
|
git push https://x-access-token:${{ secrets.AZW_PHY_ACCESS_TOKEN }}@github.com/Azurlane-HOI-mod/Azurlane-TJ.git
|
|
- name: cleanup
|
|
run: |
|
|
rm -rf azurlane-tj
|
|
ls -lh |