From d7624545970c274113bd41365702d4d24a57b0a3 Mon Sep 17 00:00:00 2001 From: Nuzair <38219313+Nuzair46@users.noreply.github.com> Date: Mon, 28 Nov 2022 00:13:04 +0530 Subject: [PATCH] Create last-updated.yml --- .github/workflows/last-updated.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/last-updated.yml diff --git a/.github/workflows/last-updated.yml b/.github/workflows/last-updated.yml new file mode 100644 index 0000000..3832bba --- /dev/null +++ b/.github/workflows/last-updated.yml @@ -0,0 +1,26 @@ +# This workflow automatically update 'Last updated' in readme.md when installer files are modified + +name: Update 'Last updated' in readme.md +on: + workflow_dispatch: + push: + branches: [main] + paths: [install.sh, uninstall.sh] + +jobs: + update-last-updated: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: update 'Last updated' in readme.md + run: sed -i "/Last updated:<\/strong> /s|> .*
|> $(date +"%d %B %Y")
|" readme.md + + - name: Commit and Push readme.md + run: | + git config user.name github-actions + git config user.email github-actions@github.com + git add readme.md + git commit -m "[github-actions] updated readme.md" + git push