GitHub plan |
Total concurrent jobs |
Maximum concurrent macOS jobs |
---|---|---|
Free | 20 | 5 |
Pro |
40 |
5 |
Team | 60 | 5 |
Enterprise |
180 |
15 |
name: Greet Everyone
# This workflow is triggered on pushes to the repository.
on: [push]
jobs:
build:
# Job name is Greeting
name: Greeting
# This job runs on Linux
runs-on: ubuntu-latest
steps:
# This step uses GitHub's hello-world-javascript-action: https://github.com/actions/hello-world-javascript-action
- name: Hello world
uses: actions/hello-world-javascript-action@v1
with:
who-to-greet: 'Mona the Octocat'
id: hello
# This step prints an output (time) from the previous step's action.
- name: Echo the greeting's time
run: echo 'The time was ${{ steps.hello.outputs.time }}.'
steps:
- name: Hello world
run: echo Hello world $FIRST_NAME $middle_name $Last_Name!
env:
FIRST_NAME: Mona
middle_name: The
Last_Name: Octocat
steps:
- name: My first action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FIRST_NAME: Mona
LAST_NAME: Octocat
steps:
- name: Hello world action
with: # Set the secret as an input
super_secret: ${{ secrets.SuperSecret }}
env: # Or as an environment variable
super_secret: ${{ secrets.SuperSecret }}
jobsjob_idstepsenv)
steps:
- uses: actions/setup-node@74bc508 # Reference a specific commit
- uses: actions/setup-node@v1 # Reference the major version of a release
- uses: actions/[email protected] # Reference a minor version of a release
- uses: actions/setup-node@master # Reference a branch
# push
name: descriptive-workflow-name
on: push
# 每小时
on:
schedule:
- cron: '0 * * * *'
#特定分支、tag、路径
on:
push:
branches:
- master
tags:
- v1
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'test/*'
runs-on: ubuntu-latest
github 服务器采用如下统一配置:
* 2-core CPU
* 7 GB of RAM memory
* 14 GB of SSD disk space
推荐使用linux,资源消耗存在不同比率。
* linux:1,
* window:2
* mac:10.
runs-on: [self-hosted, linux, ARM32]
{owner}/{repo}@{ref} or {owner}/{repo}/{path}@{ref}.
{owner}/{repo}@{ref} or ./path/to/dir
|-- hello-world (repository)
| |__ .github
| └── workflows
| └── my-first-workflow.yml
| └── actions
| |__ hello-world-action
| └── action.yml
jobs:
build:
runs-on: ubuntu-latest
steps:
# This step checks out a copy of your repository.
- uses: actions/checkout@v1
# This step references the directory that contains the action.
- uses: ../github/actions/hello-world-action
docker://{image}:{tag}
![](https://github.com/actions/hello-world/workflows/Greet Everyone/badge.svg)
jobs:
my_first_job:
steps:
- name: My first step
uses: docker://gcr.io/cloud-builders/gradle
- name: Install Dependencies
run: npm install
shell: bash
jobs:
my_first_job:
steps:
- name: My first step
uses: actions/hello_world@master
with:
first_name: Mona
middle_name: The
last_name: Octocat
firstname ,会被转化为INPUTFIRST_NAME使用
GITHUBTOKEN不满足,可以使用[personal accessstoken](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token)
ACTIONS_STEP_DEBUG = true
ACTIONS_RUNNER_DEBUG = true
欢迎关注我们【前端漫漫】,了解最新文章动态联系邮箱:[email protected]