Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberBoyAyush authored Jun 16, 2024
1 parent 0bfb7b7 commit e085f6c
Showing 1 changed file with 14 additions and 23 deletions.
37 changes: 14 additions & 23 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Index Files
name: Update Repository

on:
push:
Expand All @@ -10,28 +10,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Set up Git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Make changes
run: |
echo "Make some changes to the repository"
- name: Generate file index
run: |
python generate_index.py
- name: Commit and push changes
env:
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add index.txt
git commit -m 'Update file index'
git push https://cyberboyayush:${{ secrets.PAT_TOKEN }}@github.com/cyberboyayush/Data-Structures-And-Algorithms.git main
- name: Commit and Push
run: |
git add .
git commit -m 'Automated update'
git push https://${{ secrets.SECRET_KEY }}@github.com/cyberboyayush/Data-Structures-And-Algorithms.git main

0 comments on commit e085f6c

Please sign in to comment.