.github/workflows/Actions.yml #10
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: 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" | |
# Pull the latest changes to avoid conflicts | |
git pull origin main --rebase | |
# 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 |