Skip to content

Commit

Permalink
chore: update GitHub Actions workflow file
Browse files Browse the repository at this point in the history
- Rename `.github/workflows/ci.yml` to `.github/workflows/main.yml`
- Change the name of the workflow from "test" to "CI"
- Add instructions for creating a `.github/workflows/main.yml` file
- Add example content for the `main.yml` file

Signed-off-by: Bo-Yi Wu <[email protected]>
  • Loading branch information
appleboy committed Sep 25, 2023
1 parent 549fb25 commit b1a5076
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml → .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test
name: CI
on: [push]
jobs:
build:
Expand Down
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,29 @@ services:
請將 `<instance url>` 替換成你的 Gitea 服務網址,`<registration token>` 替換成你的 Runner Token。啟動後可以在後台看到底下畫面

![gitea runner list](./images/gitea-runner-list.png)

## 撰寫 Gitea Actions

請建立 `.github/workflows` 資料夾,並建立 `main.yml` 檔案

```bash
mkdir -p .github/workflows
```

打開 `main.yml` 檔案,輸入以下內容:

```yaml
name: CI
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: echo hello world
run: |
echo "hello world"
```

請將 `echo hello world` 替換成你想要執行的指令,例如 `npm install` 或 `npm test`。

0 comments on commit b1a5076

Please sign in to comment.