Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
luooooob committed Dec 11, 2020
1 parent ef980b3 commit 3067a2a
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 9 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/luob/create-my-awesome/build-test)
![GitHub top language](https://img.shields.io/github/languages/top/luob/create-my-awesome)

Github Actions for automatically generating the personal awesome list from all of the repositories you starred.
Github Actions for automatically generating a personal awesome project to organize all your starred repositories.

## Usage

Expand Down Expand Up @@ -38,18 +38,19 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
```
- Pushing changes with `${{ github.token }}` will not create a new workflow run, this prevents you from accidentally creating recursive workflow runs. So don't warry about trigger it on changes.

- Pushing changes to Github with repositories's token(`${{ github.token }}`) will not create a new workflow run, so don't warry about creating recursive workflow runs.

## Advance Usage

You can customize the description:

```yaml
# ...
- uses: luob/[email protected]
with:
description: 'A liSt oF awesOme thiNgs.',
# You can use the data of any Github user, default to the owner of the repository
username: zhang-san
# customize the description, default to 'A collection of awesome things.'
description: 'A cOllectiOn OF awesOme thiNgs.',
# customize the target directory. Default to the root.
targetDir: ./target/
# ...
```
Expand Down
74 changes: 74 additions & 0 deletions README.zh-Hans.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Create My Awesome

![GitHub release](https://img.shields.io/github/v/release/luob/create-my-awesome)
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/luob/create-my-awesome/build-test)
![GitHub top language](https://img.shields.io/github/languages/top/luob/create-my-awesome)

Github Actions, 用于自动生成一个Awesome项目来整理所有你star过的仓库

## Usage

1. [新建一个Github仓库](https://github.com/new)
2. 在这个仓库中, [新建一个GitHub Actions 工作流程](https://docs.github.com/cn/free-pro-team@latest/actions/quickstart) 然后把下面的内容复制到 `.yml` 文件里

```yaml

name: 'build'
on:
push:
branches:
- main
schedule:
# UTC时间每天00:00执行
# 如果想在北京时间00:00执行,应该是 '0 16 * * *'
# 更多例子见 https://crontab.guru/examples.html
- cron: '0 0 * * *'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: luob/[email protected]
# 提交更改
# 见 https://github.com/EndBug/add-and-commit
- uses: EndBug/add-and-commit@v5
with:
message: 'Update README.md'
env:
GITHUB_TOKEN: ${{ github.token }}
```
使用仓库提供的`token`(`${{ github.token }}`)向Github提交更改并不会触发新工作流程, 不用担心这个工作流程会造成死循环.

## 更多用法

```yaml
# ...
- uses: luob/[email protected]
with:
# 你可以使用任何Github用户的数据, 默认是仓库所有人
username: zhang-san
# 自定义项目描述, 默认是'A collection of awesome things.'
description: 'A cOllectiOn OF awesOme thiNgs.',
# 自定义目标文件夹, 默认是项目根目录
targetDir: ./target/
# ...
```

## 贡献

```sh
npm i
npm run all
```

如果要本地运行, 可以修改`.env.example`文件中的变量然后另存为`.env`. 然后运行:

```sh
npm run local
```

## 版权

[MIT](LICENSE)
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Create My Awesome
description: >
automatically generating the personal awesome list from all of the repositories you starred.
Github Actions for automatically generating a personal awesome project to organize all your starred repositories.
author: luob
branding:
icon: book
Expand Down Expand Up @@ -28,7 +28,7 @@ inputs:
default: ${{ github.token }}

targetDir:
default: ./
default: ${{ github.workspace }}

runs:
using: 'node12'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "create-my-awesome",
"version": "1.0.0",
"private": true,
"description": "Github Actions for automatically generating the personal awesome list from all of the repositories you starred.",
"description": "Github Actions for automatically generating a personal awesome project to organize all your starred repositories",
"main": "lib/main.js",
"scripts": {
"build": "tsc",
Expand Down

0 comments on commit 3067a2a

Please sign in to comment.