2.软文推荐
3.软文推荐
Github 目前已经推出了自己的 CICD 服务 —— Github Actions,而且比微软的 Azure DevOps Pipelines 对开发者来说更友好,使用起来更好用。
Github Actions 核心概念总体看下来感觉是从 Azure Pipelines 迁移过来的东西,有许多概念和 Azure Pipelines 是类似的,如果你之前用过 azure pipelines,应该很容易上手
Runner 用来跑 cicd build 的服务器 Github Hosted Runner Github 官方提供的 Runner Self-Hosted Runner 用自己的服务器作为 Runner Workflow 定义 CI/CD 的流程,需要执行哪些操作,需要做什么 Workflow 定义 workflow 的配置文件,通常放在项目根目录下的 .github/workflows 文件夹下 Workflow Run 每一次 CI/CD build Event 触发 ci/cd build 的事件,如 push/issue/pr Job 由一系列 Step 组成,Job 可以并行执行也可以串行执行,每一个 Job 都是一个新的环境 Step 对应 Job 执行的每一个步骤 Action 对应 Step 里执行的可复用的操作
Github Actions 配置示例来看一个 Github Actions 的 dotnet 配置:
name: dotnetcore # workflow name
on: [push] # event trigger,什么事件触发 build
jobs:
build:
runs-on: ubuntu-latest # 指定 runner,使用 Github 提供的 runner
steps:
- uses: actions/checkout@v1 # checkout
- name: Setup .NET Core # 设置 dotnet core 环境
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.0.100
- name: dotnet info # 输出 dotnet -info,查看 dotnet 版本信息
run: dotnet --info
- name: build
run: bash build.sh # 在 bash 中运行 build 脚本
徽章
Sample:
[![Github Build Status](https://github.com/WeihanLi/WeihanLi.Common/workflows/dotnetcore/badge.svg?branch=dev)](https://github.com/WeihanLi/WeihanLi.Common/actions?query=workflow%3Adotnetcore+branch%3Adev)
Github Build Status
https://github.com///workflows//badge.svg
https://github.com///workflows//badge.svg?branch=
本文来源:www.lxlinux.net/8719.html,若引用不当,请联系修改。
1
企鹅小屋TG推送消息,商家推出了香港ntt线路的机器,国际线路,带宽最高给到2000Mbps,目前商家下大预售,预计一周左右交付,目前看到香...