Explorar o código

stayactive test

crocandr %!s(int64=2) %!d(string=hai) anos
pai
achega
730def376d
Modificáronse 1 ficheiros con 6 adicións e 5 borrados
  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