Merge pull request #512 from warmachine028/dependabot/npm_and_yarn/vi… #495
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: 📆 Update Date | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GITHUB_TOKEN }} # You need to create your own token with commit rights | |
ref: ${{ github.ref }} # The branch you want to commit to | |
- name: Give Permissions | |
run: | # if this line gives error, then run it locally | |
git update-index --chmod=+x ./.github/workflows/updateDate.sh | |
- name: Update Files | |
run: ./.github/workflows/updateDate.sh | |
shell: bash | |
- name: Push changes | |
uses: EndBug/add-and-commit@v9 | |
if: ${{ '<!-- `date "+%d/%m/%y"` -->' != '`tail -n 1 README.md`' }} | |
with: | |
committer_name: GitHub Actions | |
committer_email: [email protected] | |
add: . | |
message: 'Updating Date' |