You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2022/07/28 16:10:01 UTC

[airflow] branch main updated: Restore pushing CI image as latest to GHCR.io (#25380)

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 900c81b87a Restore pushing CI image as latest to GHCR.io (#25380)
900c81b87a is described below

commit 900c81b87a76a9df8a3a6435a0d42348e88c5bbb
Author: Jarek Potiuk <ja...@polidea.com>
AuthorDate: Thu Jul 28 18:09:50 2022 +0200

    Restore pushing CI image as latest to GHCR.io (#25380)
    
    We stopped pushing latest CI/PROD images to ghcr.io when we started to
    run multiplatform builds and switched to --cache-from option of
    buildx. Hoever there are still some workflows that might require
    the latest image (for example Codespaces) and generally speaking
    someone could just pull the image if they are curious.
    
    This PR adds back pushing the image (only "linux/amd"
    during image cache preparation.
---
 .github/workflows/ci.yml | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index cd47e56656..661b16b30a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1699,7 +1699,6 @@ ${{ hashFiles('.pre-commit-config.yaml') }}"
         platform: ["linux/amd64", "linux/arm64"]
     env:
       RUNS_ON: ${{ fromJson(needs.build-info.outputs.runs-on) }}
-      PYTHON_MAJOR_MINOR_VERSION: ${{ matrix.python-version }}
     steps:
       - name: Cleanup repo
         run: docker run -v "${GITHUB_WORKSPACE}:/workspace" -u 0:0 bash -c "rm -rf /workspace/*"
@@ -1741,7 +1740,7 @@ ${{ hashFiles('.pre-commit-config.yaml') }}"
       - name: "Start ARM instance"
         run: ./scripts/ci/images/ci_start_arm_instance_and_connect_to_docker.sh
         if: matrix.platform == 'linux/arm64'
-      - name: "Push CI cache ${{ matrix.python-version }} ${{ matrix.platform }}"
+      - name: "Push CI cache ${{ matrix.platform }}"
         run: >
           breeze build-image
           --builder airflow_cache
@@ -1749,8 +1748,10 @@ ${{ hashFiles('.pre-commit-config.yaml') }}"
           --run-in-parallel
           --force-build
           --platform ${{ matrix.platform }}
-        env:
-          PYTHON_MAJOR_MINOR_VERSION: ${{ matrix.python-version }}
+      - name: "Push CI latest image ${{ matrix.platform }}"
+        run: >
+          breeze build-image --tag-as-latest --push-image --run-in-parallel --platform ${{ matrix.platform }}
+        if: matrix.platform == 'linux/amd64'
       - name: "Move dist packages to docker-context files"
         run: mv -v ./dist/*.whl ./docker-context-files
         if: needs.build-info.outputs.default-branch == 'main'
@@ -1761,9 +1762,12 @@ ${{ hashFiles('.pre-commit-config.yaml') }}"
           --install-packages-from-context
           --prepare-buildx-cache
           --platform ${{ matrix.platform }}
-        env:
-          PYTHON_MAJOR_MINOR_VERSION: ${{ matrix.python-version }}
         if: needs.build-info.outputs.default-branch == 'main'
+      - name: "Push PROD latest image ${{ matrix.platform }}"
+        run: >
+          breeze build-prod-image --tag-as-latest
+          --push-image --run-in-parallel --platform ${{ matrix.platform }}
+        if: matrix.platform == 'linux/amd64'
       - name: "Stop ARM instance"
         run: ./scripts/ci/images/ci_stop_arm_instance.sh
         if: always() && matrix.platform == 'linux/arm64'