mirror of
https://github.com/yeasy/docker_practice.git
synced 2024-11-05 14:13:40 +00:00
1c932ef567
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
29 lines
579 B
Go
29 lines
579 B
Go
# GitHub Actions
|
|
|
|
GitHub [Actions](https://github.com/features/actions) 是 GitHub 推出的一款 CI/CD 工具。
|
|
|
|
我们可以在每个 `job` 的 `step` 中使用 Docker 执行构建步骤。
|
|
|
|
```yaml
|
|
on: push
|
|
|
|
name: CI
|
|
|
|
jobs:
|
|
my-job:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
with:
|
|
fetch-depth: 2
|
|
- name: run docker container
|
|
uses: docker://golang:alpine
|
|
with:
|
|
args: go version
|
|
```
|
|
|
|
## 参考资料
|
|
|
|
* [Actions Docs](https://docs.github.com/en/free-pro-team@latest/actions)
|