1. 使用 RMarkdown 的 child 参数,进行文档拼接。
  2. 这样拼接以后的笔记方便复习。
  3. 相关问题提交到 Issue

1 安装

GitHub Learning Lab will create a repository named hello-github-actions on your GitHub account. You cannot register for a course until you have installed the app.

安装 App

Need tighter permissions? You can also install the app each time you register for a new course/repository. Limit GitHub Learning Lab to Course Repositories

完成后,就开始了,需要一个项目learn_make授权 app。


Hello, GitHub Actions! Your “Hello, World” for GitHub Actions GitHub Actions Workflows Hello World JiaxiangBU/hello-github-actions

开始学习 GitHub Actions。

2 Add a Dockerfile

Start your action by creating a Dockerfile

  • 按照第一个 issue 1 的要求完成作业

要求见 https://github.com/JiaxiangBU/hello-github-actions/issues/1

然后操作 pull request 完成。

7 Seeing your Action in action

  • uses: actions/checkout@v1 uses a community action called checkout to allow the workflow to access the contents of the repository
  • uses: ./action-a provides the relative path the action we’ve created in the action-a directory of the repository
  • env: is used to specify the environment variables that will be available to your action in the runtime environment. In this case, the environment variable is MY_NAME, and it is currently initialized to "Mona".

所以这个项目必须要公开的,因为 workflow 要访问这个项目。

This action will run any time a new commit is created or pushed to the remote repository. Since you just created a commit, the workflow should have been triggered. This might take a few minutes since it’s the first time running in this repository.

每次 push 都会调用这个 GitHub Actions。 并且第一次会比较花时间。

8 Trigger the workflow

https://github.com/JiaxiangBU/hello-github-actions/actions 查看效果。

9 可以创建 badge

![A workflow for my Hello World file](https://github.com/JiaxiangBU/hello-github-actions/workflows/A%20workflow%20for%20my%20Hello%20World%20file/badge.svg)

A workflow for my Hello World file

A workflow for my Hello World file

10 Incorporate the workflow

https://github.com/JiaxiangBU/hello-github-actions/pull/2#pullrequestreview-351953751

https://github.com/JiaxiangBU/hello-github-actions/runs/421904399?check_suite_focus=true#step:3:58

这是生成的Hello world my name is Mona

As a final step, merge this pull request so the action will be a part of the master branch. - Your merge should trigger your action again, check it out in the Actions tab. https://github.com/JiaxiangBU/hello-github-actions/issues/3

https://github.com/JiaxiangBU/hello-github-actions/runs/421913765?check_suite_focus=true

附录

参考文献