Merge branch 'master' into CI

This commit is contained in:
Anonymus Raccoon
2020-04-28 20:43:14 +02:00
committed by GitHub
+4 -11
View File
@@ -7,9 +7,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
@@ -20,29 +18,24 @@ jobs:
echo -ne $SSH_PRIVATE_KEY > ~/.ssh/blih
chmod 400 ~/.ssh/blih
find . -regex '.*\/\.git.*' -delete
ls -lRa
echo -ne "Host git.epitech.eu\n\tHostname git.epitech.eu\n\tUser git\n\tIdentityFile $(readlink -f ~/.ssh/blih)\n" >> ~/.ssh/config
git config --global user.email "${USER}@epitech.eu"
git config --global user.name "Auto push from github"
ssh-keyscan git.epitech.eu >> ~/.ssh/known_hosts
echo "Clonning as ${USER}@epitech.eu from git@git.epitech.eu:/${USER}@epitech.eu/${REPO}"
cat ~/.ssh/blih | wc
git clone git@git.epitech.eu:/${USER}@epitech.eu/${REPO} /tmp/blihRepo
echo "Clonne done"
export REPOVAR=`pwd`
cd /tmp/blihRepo
echo cdDone
find . -not -path "./.git*" -delete
echo findDone
cp -r $REPOVAR/* .
echo cpDone
ls -lRa
git add --all
echo addDone
git commit -m "Sync"
echo Commid
git push origin master
echo Pushed
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
USER: clement.le-bihan
REPO: PSU_42sh_2019
REPO: PSU_42sh_2019
#The SSH_PRIVATE_KEY should be a secret on the repository containing the private key of the repository owner.
#This key should NOT contains regular \n but new-line should be marked by the string "\n" aka \\n