更新时间:2022-11-03 10:47:31
The jobs
map in a GitHub Workflow, per jobs.<job_id>
, is a map where:
键
job_id
是一个字符串,其值是作业的映射配置数据.
The key
job_id
is a string and its value is a map of the job's configuration data.
从YAML中剥离所有其他内容,以专注于该地图:
Stripping all of the other content out of the YAML to focus on that map:
jobs:
build:
# ...
package:
# ...
在顶层已定义了两个作业,其ID为 build
和 package
.现在,让我们看一下这些作业的某些内容:
At the top level, two jobs have been defined, with the IDs build
and package
. Now let's look at some of the content of those jobs:
jobs:
build:
runs-on: ubuntu-latest
# ...
package:
runs-on: ubuntu-latest
needs: test
# ...