170 搜索结果 "runs-on"
GitHub Actions / 迁移到 GitHub Actions / 手动迁移 /
从 Travis CI 迁移到 GitHub Actions
env: ${{ matrix.env }} 来引用自定义变量:
name: Node.js CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- node-version: '14.x'
site: "prod"
GitHub Actions / 用例和示例 / 项目管理 /
添加标签时评论议题
labeled
jobs:
add-comment:
if: github.event.label.name == 'help wanted'
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Add comment
run:
GitHub Actions / 写入工作流 /
GitHub Actions 快速入门
testing out GitHub Actions 🚀
on: [push]
jobs:
Explore-GitHub-Actions:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered
GitHub Actions / 用例和示例 / 生成和测试 /
构建和测试 Ruby
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.1', '3.0', '2.7']
steps:
GitHub Actions / 安全性 / 安全指南 /
自动令牌身份验证
输入参数的值:
YAML
name: Open new issue
on: workflow_dispatch
jobs:
open-issue:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
- run: |
GitHub Actions / 写入工作流 / 选择工作流何时运行 /
触发工作流程
添加标签时运行的任何工作流程都将在执行此步骤后运行。
on:
issues:
types:
- opened
jobs:
label_issue:
runs-on: ubuntu-latest
steps:
- env:
GH_TOKEN: ${{ secrets.MY_TOKEN }}
ISSUE_URL:
GitHub Actions / 共享自动化 / 创建操作 /
创建 JavaScript 操作
行。 还可以将 who-to-greet 输入替换为你的名称。
YAML
on: [push]
jobs:
hello_world_job:
runs-on: ubuntu-latest
name: A job to say hello
steps:
- name: Hello world action
GitHub Actions / 用例和示例 / 部署 /
使用 GitHub Actions 进行部署
Deployment
concurrency: production
on:
push:
branches:
- main
jobs:
deployment:
runs-on: ubuntu-latest
environment: production
steps:
- name: deploy
# ...deployment-specific
GitHub Actions / 安全性 / 安全强化部署 /
在 HashiCorp Vault 中配置 OpenID Connect
检索的机密的路径。 例如:secret/data/production/ci npmToken。
YAML
jobs:
retrieve-secret:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name:
REST API / 身份验证 /
对 REST API 进行身份验证
的工作流语法。
在以下示例工作流中,将 PATH 替换为终结点的路径。 有关路径的详细信息,请参阅 REST API 入门。
jobs:
use_api:
runs-on: ubuntu-latest
permissions: {}
steps:
- env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN