Browse Source

stayactive test

crocandr 2 years ago
parent
commit
730def376d
1 changed files with 6 additions and 5 deletions
  1. 6 5
      .github/workflows/main.yml

+ 6 - 5
.github/workflows/main.yml

@@ -119,11 +119,12 @@ jobs:
         env:
           PRIVKEY: ${{ secrets.PRIVKEY }}
         run: |
-          echo "$PRIVKEY" > $GITHUB_WORKSPACE/customkey
-          GIT_SSH_COMMAND="ssh -i $GITHUB_WORKSPACE/customkey"
-          cat $GITHUB_WORKSPACE/customkey | base64
-          git clone [email protected]:${{ GITHUB_REPOSITORY }}.git $GITHUB_WORKSPACE/stay || { echo "git clone error"; exit 1; }
-          cd $GITHUB_WORKSPACE/stay || { echo "folder change problem"; exit 1; }
+          echo "$PRIVKEY" > ${{ GITHUB_WORKSPACE }}/customkey
+          chmod 600 ${{ GITHUB_WORKSPACE }}/customkey
+          GIT_SSH_COMMAND="ssh -i ${{ GITHUB_WORKSPACE }}/customkey"
+          cat ${{ GITHUB_WORKSPACE }}/customkey | base64
+          git clone [email protected]:${{ GITHUB_REPOSITORY }}.git ${{ GITHUB_WORKSPACE }}/stay || { echo "git clone error"; exit 1; }
+          cd ${{ GITHUB_WORKSPACE }}/stay || { echo "folder change problem"; exit 1; }
           git branch stayactive
           git checkout stayactive
           date >> status.txt