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 2024/03/17 10:12:57 UTC

(airflow) 01/01: Fix wrong & push condition on building CI image

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

potiuk pushed a commit to branch fix-missing-condition-on-image-push
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 57d2a270d747f7d0c9f57b9fd43236be3714c945
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Sun Mar 17 11:12:17 2024 +0100

    Fix wrong & push condition on building CI image
---
 .github/workflows/ci-image-build.yml | 19 ++++---------------
 1 file changed, 4 insertions(+), 15 deletions(-)

diff --git a/.github/workflows/ci-image-build.yml b/.github/workflows/ci-image-build.yml
index 36d9653b5d..c1c986574a 100644
--- a/.github/workflows/ci-image-build.yml
+++ b/.github/workflows/ci-image-build.yml
@@ -137,21 +137,9 @@ ${{ inputs.do-build == 'true' && inputs.image-tag || '' }}"
       - name: Login to ghcr.io
         run: echo "${{ env.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
         if: inputs.do-build == 'true'
-      - name: "Build & Push ${{ inputs.platform }}:${{ inputs.image-tag }} ${{ matrix.python-version }}"
-        shell: bash
-        run: >
-          breeze ci-image build --push --tag-as-latest --image-tag "${{ inputs.image-tag }}"
-          --python "${{ matrix.python-version }}"
-          --platform "linux/${{ inputs.platform }}"
-        env:
-          DOCKER_CACHE: ${{ inputs.cache-directive }}
-          INSTALL_MYSQL_CLIENT_TYPE: ${{ inputs.install-mysql-client-type }}
-          UPGRADE_TO_NEWER_DEPENDENCIES: ${{ inputs.upgrade-to-newer-dependencies }}
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-          USE_UV: ${{ inputs.use-uv }}
-          BUILDER: ${{ inputs.platform == 'amd64' && 'default' || 'airflow_cache' }}
-        if: inputs.do-build == 'true'
-      - name: "Build ${{ inputs.platform }}:${{ inputs.image-tag }} ${{ matrix.python-version }}"
+      - name: >
+          Build ${{ inputs.push == 'true' && ' & push' || '' }}:${{ inputs.platform }}:${{ inputs.image-tag }}
+          ${{ matrix.python-version }}
         shell: bash
         run: >
           breeze ci-image build --tag-as-latest --image-tag "${{ inputs.image-tag }}"
@@ -164,6 +152,7 @@ ${{ inputs.do-build == 'true' && inputs.image-tag || '' }}"
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           USE_UV: ${{ inputs.use-uv }}
           BUILDER: ${{ inputs.platform == 'amd64' && 'default' || 'airflow_cache' }}
+          PUSH: ${{ inputs.push-image }}
         if: inputs.do-build == 'true'
       - name: "Stop ARM instance"
         run: ./scripts/ci/images/ci_stop_arm_instance.sh