setup repo #1
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: setup repo | |
on: | |
create: | |
jobs: | |
setup: | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup Git and create PR | |
run: | | |
git config --global user.name "Mayank Chaudhari<https://mayank-chaudhari.vercel.app>" | |
git config --global user.email "[email protected]" | |
git fetch | |
git checkout main | |
- name: Set up repo | |
run: chmod +x ./setup.sh && (sudo bash ./setup.sh ${{ github.event.repository.owner.login }} ${{ github.event.repository.name }} || ./setup.sh ${{ github.event.repository.owner.login }} ${{ github.event.repository.name }}) | |
- name: Push changes back to repo | |
run: | | |
git add . | |
git commit -m 'Rebrand 💖 <a href="https://mayank-chaudhari.vercel.app" target="_blank">Mayank Kumar Chaudhari</a> [skip ci]' | |
git push origin main |