Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (28 sloc) 907 Bytes
name: Push to gitee
on:
push:
branches:
- gitee
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set SSH Key
env:
SSH_KEY: ${{ secrets.GITEE_SSH_KEY }}
SSH_KEY_PUB: ${{ secrets.GITEE_SSH_PUB }}
run: |
mkdir -p ~/.ssh
ssh-keyscan -H gitee.com >> ~/.ssh/known_hosts
echo ${SSH_KEY} > ~/.ssh/id_rsa
sed -i -e "s#\\\\n#\n#g" ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
echo ${SSH_KEY_PUB} > ~/.ssh/id_rsa.pub
chmod 600 ~/.ssh/id_rsa.pub
- name: Push to gitee
run: |
git switch -c master
git remote add gitee git@gitee.com:befovy/images.git
imgbot=`git rev-parse HEAD | git show -s --format='%ae' | grep imgbot` || echo "no imgbot"
[[ ! -z "$imgbot" ]] && git push --set-upstream gitee master -f || echo "Ingore push"
You can’t perform that action at this time.