diff --git a/.github/workflows/sync-whisper.yml b/.github/workflows/sync-whisper.yml index d5656a3..0d59eab 100644 --- a/.github/workflows/sync-whisper.yml +++ b/.github/workflows/sync-whisper.yml @@ -22,50 +22,50 @@ jobs: LATEST_TAG: ${{ env.LATEST_TAG }} - name: 🛒 Checkout main repository for /TARGET_REPOSITORY - run: git clone https://x-access-token:${{ secrets.PAT }}@github.com/${{ github.repository }} /TARGET_REPOSITORY + run: git clone https://x-access-token:${{ secrets.PAT }}@github.com/${{ github.repository }} $HOME/TARGET_REPOSITORY env: PAT: ${{ secrets.PAT }} - name: 🔀 Create/Checout the branch by TAG run: | - cd /TARGET_REPOSITORY + cd $HOME/TARGET_REPOSITORY git checkout -b $LATEST_TAG || git checkout $LATEST_TAG env: LATEST_TAG: ${{ env.LATEST_TAG }} - name: Remove everything except for the .git folder in /TARGET_REPOSITORY run: | - cd /TARGET_REPOSITORY + cd $HOME/TARGET_REPOSITORY shopt -s extglob rm -rf !(.|..|.git) - name: 🛒 Checkout main repository for /MAIN_REPOSITORY - run: git clone https://x-access-token:${{ secrets.PAT }}@github.com/${{ github.repository }} /MAIN_REPOSITORY + run: git clone https://x-access-token:${{ secrets.PAT }}@github.com/${{ github.repository }} $HOME/MAIN_REPOSITORY env: PAT: ${{ secrets.PAT }} - name: Remove whisper, .git folders in /MAIN_REPOSITORY run: | - cd /MAIN_REPOSITORY + cd $HOME/MAIN_REPOSITORY shopt -s extglob rm -rf .git rm -rf src/whisper - name: Move content of /MAIN_REPOSITORY to /TARGET_REPOSITORY run: | - cd /MAIN_REPOSITORY + cd $HOME/MAIN_REPOSITORY shopt -s dotglob - mv -f * /TARGET_REPOSITORY + mv -f * $HOME/TARGET_REPOSITORY - name: 🔄 Clone whisper.cpp by tag run: | - git clone --branch $LATEST_TAG --depth 1 https://github.com/ggerganov/whisper.cpp.git /LATEST_TAG_WHISPER_CPP + git clone --branch $LATEST_TAG --depth 1 https://github.com/ggerganov/whisper.cpp.git $HOME/LATEST_TAG_WHISPER_CPP env: LATEST_TAG: ${{ env.LATEST_TAG }} - name: Remove unnecessary files/folders in /LATEST_TAG_WHISPER_CPP folder run: | - cd /LATEST_TAG + cd $HOME/LATEST_TAG shopt -s extglob rm -rf .git rm -rf .devops @@ -81,14 +81,14 @@ jobs: - name: Move content of /LATEST_TAG_WHISPER_CPP to /TARGET_REPOSITORY/src/whisper run: | - cd /LATEST_TAG_WHISPER_CPP + cd $HOME/LATEST_TAG_WHISPER_CPP shopt -s dotglob - mkdir -p /TARGET_REPOSITORY/src/whisper - mv -f * /TARGET_REPOSITORY/src/whisper + mkdir -p $HOME/TARGET_REPOSITORY/src/whisper + mv -f * $HOME/TARGET_REPOSITORY/src/whisper - name: 💾 Commit and push changes run: | - cd /TARGET_REPOSITORY + cd $HOME/TARGET_REPOSITORY git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.name "GitHub Action" git add .