Skip to content

.github/workflows/Actions.yml #36

.github/workflows/Actions.yml

.github/workflows/Actions.yml #36

Workflow file for this run

name: Readme Automation
on:
schedule:
- cron: "0 12 * * *"
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