From 828a0d44244f98819625b0b2a2d00f2969cb10ce Mon Sep 17 00:00:00 2001 From: Antim Pal <134076504+iamAntimPal@users.noreply.github.com> Date: Mon, 24 Mar 2025 01:51:41 +0530 Subject: [PATCH] Create update-date.yml --- .github/workflows/update-date.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/update-date.yml diff --git a/.github/workflows/update-date.yml b/.github/workflows/update-date.yml new file mode 100644 index 0000000..309720d --- /dev/null +++ b/.github/workflows/update-date.yml @@ -0,0 +1,29 @@ +name: Update Date in README + +on: + schedule: + - cron: "0 0 * * *" # Runs daily at midnight UTC + workflow_dispatch: # Allows manual triggering + +jobs: + update-date: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Update date in README.md + run: | + # Get current date (customize format below) + CURRENT_DATE=$(date +'%Y-%m-%d') + + # Replace placeholder with the current date + sed -i "s//${CURRENT_DATE}/g" README.md + + - name: Commit and push changes + run: | + git config user.name "github-actions" + git config user.email "actions@github.com" + git add README.md + git commit -m "Update date in README" || echo "No changes to commit" + git push