Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 9, 2023
1 parent 06d6bd0 commit 7c65a6f
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/sync-whisper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 .
Expand Down

0 comments on commit 7c65a6f

Please sign in to comment.