Skip to content

AmosHuKe/ohpm-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ohpm-dashboard

Example: Example.md

Setup 💻

1.Add comments to the place where you want to update in the markdown file.

  • Table
<!-- md:OHPMDashboard begin --><!-- md:OHPMDashboard end -->
  • Package total
<!-- md:OHPMDashboard-total begin --><!-- md:OHPMDashboard-total end -->

2.Enable read/write permissions

(recommend) If you use a Personal access token:

e.g. github_token: ${{ secrets.xxxxxx }} (ghp_xxxxx)
Create a token (enable repo permissions) https://github.com/settings/tokens/

If you use the current repo's token:

e.g. github_token: ${{ secrets.GITHUB_TOKEN }}
https://docs.github.com/en/actions/security-guides/automatic-token-authentication
Current repo's settings: Settings -> Actions -> General -> Workflow permissions -> Read and write permissions

3.Edit the settings in .github/workflows/ohpm-dashboard.yml

...

jobs:
  ohpm-dashboard-job:
    runs-on: ubuntu-latest
    name: ohpm-dashboard
    steps:
      - name: run ohpm-dashboard
        uses: AmosHuKe/ohpm-dashboard@v1
        with:
          github_token: ${{ Personal access token }} or ${{ secrets.GITHUB_TOKEN }}
          github_repo: "https://github.com/AmosHuKe/ohpm-dashboard"
          filename: "Example.md"
          publisher_list: "6542179b6dad4e55f6635764" # https://ohpm.openharmony.cn/#/cn/publisher/6542179b6dad4e55f6635764
          package_list: "@candies/extended_text,@bb/xx,@cc/xx"
          sort_field: "publishTime"
          sort_mode: "asc"

...
Setting Default Value Description
github_token required - - Github Token with repo permissions
github_repo required - - Github repo to be manipulated
commit_message docs(ohpm-dashboard): ohpm-dashboard has updated readme - Commit message
committer_username github-actions[bot] - Committer username
committer_email 41898282+github-actions[bot]@users.noreply.github.com - Committer email
filename README.md - Markdown file
e.g. "README.md" "test/test.md"
publisher_list - - Publisher ID (, split)
https://ohpm.openharmony.cn/#/cn/publisher/6542179b6dad4e55f6635764
e.g. "6542179b6dad4e55f6635764,xxx,xxx"
package_list - - Package name (, split)
e.g. "@candies/extended_text,@bb/xx,@cc/xx"
sort_field name name, publishTime, ohpmLikes, ohpmDownloads, githubStars Sort field
sort_mode asc asc, desc Sort mode

Tips 💡

  • ⁉️: Package not found
  • publisher_list and package_list are merged
  • The Github link is parsed by the Homepage, Repository of ohpm.openharmony.cn

Thanks Shields.

License 📄

Open sourced under the Apache-2.0.

© AmosHuKe

About

Package Dashboard Table (ohpm.openharmony.cn)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages