clone-repositories #8
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: clone-repositories | |
on: | |
workflow_dispatch: | |
jobs: | |
clone-repositories: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Read repository URL from file | |
id: read-url | |
run: | | |
repo_url=$(cat repos.txt) | |
echo "REPO_URL=$repo_url" >> $GITHUB_ENV | |
- name: Remove tools folder if exists | |
run: | | |
if [ -d "tools" ]; then rm -rf tools; fi | |
- name: Clone repo into tools folder | |
run: | | |
mkdir -p tools | |
git clone $REPO_URL tools/ | |
- name: Remove .git folder from cloned repository | |
run: | | |
rm -rf tools/.git | |
- name: Commit and push changes | |
run: | | |
git config --global user.name "AyudaEnPython[bot]" | |
git config --global user.email "<>" | |
git add tools/ | |
git commit -m "Add cloned repository to tools" | |
git push origin main |