github action
In your repository, create the .github/workflows/
directory to store your workflow files.
In the .github/workflows/
directory, create a new file called learn-github-actions.yml
and add the following code.
name: learn-github-actions
run-name: ${{ github.actor }} is learning GitHub Actions
on: [push]
jobs:
check-bats-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14'
- run: npm install -g bats
- run: bats -v
Runner
https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
Choosing GitHub-hosted runners
If you use a GitHub-hosted runner, each job runs in a fresh instance of a runner image specified by runs-on.
Available GitHub-hosted runner types are:
Runner image YAML workflow label Notes
Windows Server 2022 windows-latest or windows-2022 The windows-latest label currently uses the Windows Server 2022 runner image.
Windows Server 2019 windows-2019 None
Ubuntu 22.04 ubuntu-latest or ubuntu-22.04 The ubuntu-latest label currently uses the Ubuntu 22.04 runner image.
Ubuntu 20.04 ubuntu-20.04 None
macOS 13 Ventura [Beta] macos-13 or macos-13-xl None
macOS 12 Monterey macos-latest, macos-12,
macos-latest-xl or macos-12-xl The macos-latest and macos-latest-xl workflow labels currently uses the macOS 12 runner image.
macOS 11 Big Sur macos-11 None
Preinstalled-software
https://github.com/actions/runner-images/blob/main/images/win/Windows2022-Readme.md
https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md
https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md
Hardware
Hardware specification for Windows and Linux virtual machines:
2-core CPU (x86_64)
7 GB of RAM
14 GB of SSD space
Hardware specification for macOS virtual machines:
3-core CPU (x86_64)
14 GB of RAM
14 GB of SSD space
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
2020-08-15 YCM
2020-08-15 fontInstall