6 Star 21 Fork 10

Gitee 极速下载 / Apache Airflow

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/apache/incubator-airflow
克隆/下载
03_github_variables.md 3.52 KB
一键复制 编辑 原始数据 按行查看 历史

Table of Contents generated with DocToc

GitHub Registry Variables

Our CI uses GitHub Registry to pull and push images to/from by default. Those variables are set automatically by GitHub Actions when you run Airflow workflows in your fork, so they should automatically use your own repository as GitHub Registry to build and keep the images as build image cache.

The variables are automatically set in GitHub actions

Variable Default Comment
GITHUB_REPOSITORY apache/airflow Prefix of the image. It indicates which registry from GitHub to use.
CONSTRAINTS_GITHUB_REPOSITORY apache/airflow Repository where constraints are stored
GITHUB_USERNAME Username to use to login to GitHub
GITHUB_TOKEN Token to use to login to GitHub. Only used when pushing images on CI.

The Variables beginning with GITHUB_ cannot be overridden in GitHub Actions by the workflow. Those variables are set by GitHub Actions automatically and they are immutable. Therefore if you want to override them in your own CI workflow and use breeze, you need to pass the values by corresponding breeze flags --github-repository, --github-token rather than by setting them as environment variables in your workflow. Unless you want to keep your own copy of constraints in orphaned constraints-* branches, the CONSTRAINTS_GITHUB_REPOSITORY should remain apache/airflow, regardless in which repository the CI job is run.

One of the variables you might want to override in your own GitHub Actions workflow when using breeze is --github-repository - you might want to force it to apache/airflow, because then the cache from apache/airflow repository will be used and your builds will be much faster.

Example command to build your CI image efficiently in your own CI workflow:

# GITHUB_REPOSITORY is set automatically in Github Actions so we need to override it with flag
#
breeze ci-image build --github-repository apache/airflow --python 3.10
docker tag ghcr.io/apache/airflow/main/ci/python3.10 your-image-name:tag

Read next about Static checks

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/incubator-airflow.git
git@gitee.com:mirrors/incubator-airflow.git
mirrors
incubator-airflow
Apache Airflow
main

搜索帮助

344bd9b3 5694891 D2dac590 5694891