Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Gitee

Gitee #2446

Workflow file for this run

name: Gitee
on:
push:
branches: main
schedule:
- cron: 55 * * * *
jobs:
Gitee:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
mkdir ~/.ssh
cat > ~/.ssh/id_rsa <<EOF
${{secrets.GITEE}}
EOF
chmod 700 ~/.ssh/id_rsa
eval $(ssh-agent -s)
ssh-add ~/.ssh/id_rsa
ssh-keyscan gitee.com >> ~/.ssh/known_hosts
ssh -T git@gitee.com || true
git config --global user.name ${GITHUB_ACTOR}
git config --global user.email ${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com
REPOURL=btnscript-bc
REPODIR=$PWD
mkdir ~/TARGET
cd ~/TARGET
git clone git@gitee.com:oniicyan/$REPOURL.git
cd $REPOURL
rm -rf *
cp -rf $REPODIR/*.* ./
git add .
git commit -m "Update from GitHub Actions" || exit 0
git push