Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Sweep GHA Fix] The GitHub Actions run failed with... #45

Merged
merged 2 commits into from
Feb 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions awesome-golang/go-advancend/projects/projects/43.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs: job1: job2: needs: job1 job3: needs: [job1, job2]
下面的配置指定虚拟机环境为`ubuntu-18.04`。

```yaml
runs-on: ubuntu-18.04
runs-on: ubuntu-latest ubuntu-18.04
```

1. `jobs.<job_id>.steps`
Expand Down Expand Up @@ -256,7 +256,7 @@ $ mkdir -p .github/workflows
*在`.github/workflows`目录下新建`helloci.yml`文件,内容如下:*

```
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
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
```

*上面的workflow文件定义了当GitHub仓库有`push`、`pull_request`事件发生时,会触发GitHub Actions工作流程,流程中定义了一个任务(Job)`helloci-build`,Job中包含了多个步骤(Step),每个步骤又包含一些动作(Action)。*
Expand Down
6 changes: 3 additions & 3 deletions cs/markdown/33.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ GitHub 同名的个人仓库是一个特殊仓库,即创建一个与你的 Git
name: Latest blog post workflow
on:
schedule:
- cron: '* 2 * * *'
- cron: '0 2 * * *'
workflow_dispatch:

jobs:
Expand All @@ -101,7 +101,7 @@ jobs:
- uses: gautamkrishnar/blog-post-workflow@master
with:
# 我的博客 / RSS 链接
feed_list: "http://zhihu.com/rss.xml"
feed_list: "https://www.zhihu.com/rss"
# 获取最新 10 篇文章
max_post_count: 10
```
Expand Down Expand Up @@ -378,7 +378,7 @@ https://rss.lilydjwg.me/zhihuzhuanlan/c_1496496113348206594
name: Latest blog post workflow
on:
schedule: # Run workflow automatically
- cron: '* 2 * * *' # Runs every hour, on the hour
- cron: '0 2 * * *' # Runs every hour, on the hour
workflow_dispatch: # Run workflow manually (without waiting for the cron to be called), through the GitHub Actions Workflow page directly

jobs:
Expand Down
Loading