My Workflow
I create cheatsheets app based on github, everyone can use this cheatsheets as template to create own cheatsheet app. But I want every user repo code update to date. So, I create github action to fetch latest changes from original repo, then create a pr.
Submission Category:
Must-Haves
Yaml File or Link to Code
      
      
        ohmycheatsheet
       / 
        actions-updater
      
    
    fetch remote source repo and update current repo
@omcs/actions-updater
fetch remote source repo and update current repo
features
In default, this action will diff source-template-repo and current-repo by filepath recursive
- 
deleted:ifcurrent/a.filenot exist insource,a.filewill be deleted. - 
add:ifcurrent/a.filenot exist, butsource/a.fileexist,a.filewill be added. - 
update:ifcurrent/a.fileandsource/a.fileexist, force updatecurrent/a.file 
Friendly pr
- read changelog as pr body
 - bump version like dependabot
 
usage
- create file 
updater.ymlin.github/workflows - add following code to 
updater.ymlfile 
name: "updater"
on:
  schedule:
    - cron: "0 23 * * *"
jobs:
  # test action works running from the schedule
  cronjob:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: ohmycheatsheet/actions-updater@v1
      with:
        repo: ohmycheatsheet/cheatsheets
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
variables
| name | description | type | required | 
|---|---|---|---|
| repo | (input) source repo | string | true | 
| ignores | (input) ignore update files | 
name: "updater"
on:
  schedule:
    - cron: "0 23 * * *"
jobs:
  cronjob:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: ohmycheatsheet/actions-updater@v1
      with:
        repo: ohmycheatsheet/cheatsheets
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Additional Resources / Info
there is a example repo
      
      
        JiangWeixian
       / 
        cheatsheets
      
    
    a cheatsheets app based on github
Built with 
features
- 
🚀 Easy and Fast develop - 
🔍 Search cheasheet with algolia - 
🌥️ Cool Website- 
✨ Support code-share with url or image 
 - 
 - 
🤖 Useful Assistants Tools- 
📩 Slack bot - Support send your recently/some-day-your-created cheatsheets with slack-bot 
 - 
 
snapshots
usage
vercel
- 
Use this repo as template
 - 
New dataset from algolia
 - 
Set below github repo secrets
- 
ALGOLIA_APPID=<ALGOLIA_APPID>- copy from algolia-api-keys - 
ALGOLIA_APP_KEY=<ALGOLIA_APP_KEY>- copy from algolia-api-keys - 
SLACK_WEBHOOK=<SLACK_WEBHOOK>- check actions-friday usage 
 - 
 - 
Deploy to Vercel'now, in Vercel deployments settings, set below env variables as
Production & Preview & Development Environment VariablesGITHUB_TOKEN- 
NEXT_PUBLIC_ALGOLIA_APPID- copy from algolia-api-keys - 
NEXT_PUBLIC_ALGOLIA_SEARCH_KEY- copy from algolia-api-keys - 
ALGOLIA_APP_KEY- copy from algolia-api-keys 
 - 
new
issueon github'issue 
netlify
- 
Use this repo as template
 - 
New dataset from algolia
 - 
Set below github…
 



    
Top comments (0)