-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (40 loc) · 1.38 KB
/
Actions.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Readme Automation
on:
schedule:
- cron: "0 8,12,16,21,23 * * *"
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install Dependencies
run: |
cd ActionWorkflow_Integration
npm install
- name: Update README and Push Changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd ActionWorkflow_Integration
npm run dev
git config user.email "[email protected]"
git config user.name "UjjwalSaini07"
# Stash any unstaged changes
git stash --include-untracked
# Pull the latest changes to avoid conflicts
git pull origin main --rebase
# Apply the stashed changes
git stash pop || true
# Check if there are any changes before committing
if [ -n "$(git status --porcelain)" ]; then
git add README.md
git commit -m "Auto Updated README on $(TZ=Asia/Kolkata date +'%Y-%m-%d %H:%M')"
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/UjjwalSaini07/DecryptorX_Stealer.git main
else
echo "No changes to commit."
fi