Skip to content

Commit 9d0c798

Browse files
[Sweep GHA Fix] Fix failing GitHub Actions (#44)
Co-authored-by: sweep-ai[bot] <128439645+sweep-ai[bot]@users.noreply.github.com>
1 parent 099a79c commit 9d0c798

File tree

1 file changed

+2
-2
lines changed
  • awesome-golang/go-advancend/projects/projects

1 file changed

+2
-2
lines changed

awesome-golang/go-advancend/projects/projects/43.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ jobs: job1: job2: needs: job1 job3: needs: [job1, job2]
127127
下面的配置指定虚拟机环境为`ubuntu-18.04`。
128128

129129
```yaml
130-
runs-on: ubuntu-18.04
130+
runs-on: ubuntu-latest ubuntu-18.04
131131
```
132132

133133
1. `jobs.<job_id>.steps`
@@ -256,7 +256,7 @@ $ mkdir -p .github/workflows
256256
*在`.github/workflows`目录下新建`helloci.yml`文件,内容如下:*
257257
258258
```
259-
name: Go Teston: [push, pull_request]jobs: helloci-build: name: Test with go ${} on ${} runs-on: ${} environment: name: helloci strategy: matrix: go_version: [1.16] os: [ubuntu-latest] steps: - name: Set up Go ${} uses: actions/setup-go@v2 with: go-version: ${} id: go - name: Check out code into the Go module directory uses: actions/checkout@v2 - name: Tidy run: | go mod tidy - name: Build run: | go build -v -o helloci . - name: Collect main.go file uses: actions/[email protected] with: name: main-output path: main.go - name: Publish to Registry uses: elgohr/Publish-Docker-GitHub-Action@master with: name: ccr.ccs.tencentyun.com/marmotedu/helloci:beta # docker image 的名字 username: ${} # 用户名 password: ${} # 密码 registry: ccr.ccs.tencentyun.com # 腾讯云Registry dockerfile: Dockerfile # 指定 Dockerfile 的位置 tag_names: true # 是否将 release 的 tag 作为 docker image 的 tag
259+
name: Go Teston: pushjobs: helloci-build: name: Test with go ${} on ${} runs-on: ${} environment: name: helloci strategy: matrix: go_version: [1.16] os: [ubuntu-latest] steps: - name: Set up Go ${} uses: actions/setup-go@v2 with: go-version: ${} id: go - name: Check out code into the Go module directory uses: actions/checkout@v2 - name: Tidy run: | go mod tidy - name: Build run: | go build -v -o helloci . - name: Collect main.go file uses: actions/[email protected] with: name: main-output path: main.go - name: Publish to Registry uses: elgohr/Publish-Docker-GitHub-Action@master with: name: ccr.ccs.tencentyun.com/marmotedu/helloci:beta # docker image 的名字 username: ${} # 用户名 password: ${} # 密码 registry: ccr.ccs.tencentyun.com # 腾讯云Registry dockerfile: Dockerfile # 指定 Dockerfile 的位置 tag_names: true # 是否将 release 的 tag 作为 docker image 的 tag
260260
```
261261
262262
*上面的workflow文件定义了当GitHub仓库有`push`、`pull_request`事件发生时,会触发GitHub Actions工作流程,流程中定义了一个任务(Job)`helloci-build`,Job中包含了多个步骤(Step),每个步骤又包含一些动作(Action)。*

0 commit comments

Comments
 (0)