且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何构建和推送Docker映像?

更新时间: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
  # ...