diff --git a/.github/workflows/add-badges.yml b/.github/workflows/add-badges.yml index 94ddff5..8441799 100644 --- a/.github/workflows/add-badges.yml +++ b/.github/workflows/add-badges.yml @@ -35,10 +35,11 @@ jobs: "badge": "https://img.shields.io/badge/language-TypeScript-blue.svg?style=flat-square", "alt": "Language", "link": "https://www.typescriptlang.org" - }, - { - "badge": "https://img.shields.io/github/last-commit/${{ env.repo_owner }}/${{ env.repo_name }}?style=flat-square", - "alt": "Last Commit", - "link": "${{ env.repo_url }}/commits/master" } ] + # if adding the last commit badge + # { + # "badge": "https://img.shields.io/github/last-commit/${{ env.repo_owner }}/${{ env.repo_name }}?style=flat-square", + # "alt": "Last Commit", + # "link": "${{ env.repo_url }}/commits/master" + # } diff --git a/.github/workflows/check-badges.yml b/.github/workflows/check-badges.yml new file mode 100644 index 0000000..0272ff8 --- /dev/null +++ b/.github/workflows/check-badges.yml @@ -0,0 +1,32 @@ +# This action use https://github.com/wow-actions/add-badges?tab=readme-ov-file to add badges to your README.md file. +# this update the reame state every hour +name: Chack Badges + +on: + schedule: + - cron: "* */1 * * *" + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: wow-actions/add-badges@v1 + env: + repo_url: ${{ github.event.repository.html_url }} + repo_name: ${{ github.event.repository.name }} + repo_owner: ${{ github.event.repository.owner.login }} + with: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + badges: | + [ + { + "badge": "https://img.shields.io/npm/v/${{ env.repo_name }}?style=flat-square", + "alt": "NPM Version", + "link": "https://www.npmjs.com/package/${{ env.repo_name }}" + }, + { + "badge": "https://img.shields.io/badge/language-TypeScript-blue.svg?style=flat-square", + "alt": "Language", + "link": "https://www.typescriptlang.org" + } + ]