Copy LLMCoder folder to LLMCodes repo #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Copy LLMCoder folder to LLMCodes repo | |
on: | |
workflow_dispatch: | |
jobs: | |
copy_folder: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout current repo | |
uses: actions/checkout@v2 | |
with: | |
path: current-repo | |
- name: Commit to another repo | |
run: | | |
echo "--------SETTING NAME--------------" | |
git config --global user.name 'GitHub Actions Bot' | |
git config --global user.email 'actions@github.com' | |
# Clones the other repository where you want to commit the changes. | |
echo "--------CLONING LLMCodes REPO--" | |
git clone https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/VedAstro/LLMCodes.git | |
# Change directory into the cloned repository. | |
cd LLMCodes | |
# Clear all files in the target repository | |
echo "--------CLEARING FILES IN LLMCodes REPO--" | |
git rm -rf . | |
git commit -m "🤖 Robot : Cleaning repo for rocket launch 🚀" | |
git push | |
# Copy the LLMCoder folder from the current repository into the cloned repository. | |
echo "--------COPYING LLMCoder FOLDER INTO LLMCodes--" | |
cp -r ../current-repo/LLMCoder/* . | |
# Add, commit, and push the changes to the other repository using the PAT. | |
echo "--------MAKING A COMMIT--" | |
git add . | |
git commit -m "🤖 Robot : Latest LLMCodes source injected from main repo with 💖" | |
echo "--------MAKING A PUSH FOR IT!--" | |
git push | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} |