eggjs / eggjs/egg

[RFC] Github Actions

Open
#3,398 3 comments 1 reaction 0 assignees View on GitHub
type: proposals
Dominant language
TypeScript
Stars
19k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

## 背景

GitHub Actions 功能启用后,无需创建服务器或接入第三方服务即可实现自定义逻辑。同时提供了对容器服务的全面支持,通过创建 Workflows 并启用 Actions 能够实现多样化的玩法。

例如,操作可以发布npm模块,在创建紧急问题时发送SMS警报,或部署生产就绪代码。 您可以通过GitHub社区发现,创建和共享您的GitHub操作。

但与此同时,需要定义一些使用规范与目录结构,便于日后对工作流的管理。

- 目录结构(Github Actions)
- 官方镜像仓库(Docker Hub)
- 制定 dockerfile/workflow 用法

**文档**

- https://developer.github.com/actions/

## 思路

**目录结构(官方示例)**

```bash
|-- hello-world (repository)
| |__ .github
| |__ main.workflow
| |__ action-a
| │__ Dockerfile
| │__ README.md
| |__ entrypoint.sh
```

**目录结构(建议结构)**

```bash
.
└── egg
├── .github
│ └── main.workflow
└── actions
├── docs-build
│ ├── Dockerfile
│ ├── README.md
│ ├── entrypoint.sh
│ └── script.sh
└── npm-publish
├── Dockerfile
├── README.md
├── entrypoint.sh
└── script.sh
```

> 描述大概的解决思路,可以包含 API 设计和伪代码等

## 跟进

- [x] Docker Hub 创建组织: `eggjs`
- [ ] 制定 dockerfile/workflow 用法

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.