Update Profile README from External Repo #2488
This file contains hidden or 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: Update Profile README from External Repo | |
| on: | |
| schedule: | |
| - cron: "*/30 * * * *" # every 30 min | |
| workflow_dispatch: | |
| jobs: | |
| update-readme: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Automation Repo | |
| uses: actions/checkout@v3 | |
| - name: Clone Profile Repo | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| run: | | |
| git clone https://x-access-token:${GH_TOKEN}@github.com/DSaatz/DSaatz.git profile-repo | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.x" | |
| - name: Install dependencies | |
| run: pip install requests | |
| - name: Run update script | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| GH_USERNAME: ${{ secrets.GH_USERNAME }} | |
| run: python update_readme.py | |
| - name: Commit and Push Changes | |
| working-directory: profile-repo | |
| run: | | |
| git config --local user.name "github-actions[bot]" | |
| git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add README.md | |
| git commit -m "Update recent activities" || echo "No changes" | |
| git push |