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.file
not exist insource
,a.file
will be deleted. -
add:
ifcurrent/a.file
not exist, butsource/a.file
exist,a.file
will be added. -
update:
ifcurrent/a.file
andsource/a.file
exist, force updatecurrent/a.file
Friendly pr
- read changelog as pr body
- bump version like dependabot
usage
- create file
updater.yml
in.github/workflows
- add following code to
updater.yml
file
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 Variables
GITHUB_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
issue
on github'issue
netlify
-
Use this repo as template
-
New dataset from algolia
-
Set below githubβ¦
Top comments (0)