This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch run-scripts-from-current-version in repository https://gitbox.apache.org/repos/asf/airflow.git
commit c6b1791c3e0c675e1bd0d1c743c62cd75916b087 Author: Jarek Potiuk <[email protected]> AuthorDate: Tue Feb 17 00:17:31 2026 +0100 Publish docs to s3 uses current version of workflows/scripts In case we built docs for past version of airflow we checkout both - current (main) version of code to use latest environment and tag version of code to build the documentation. The workflow mixed sub-workflows and run them from the "tag" version of workflow rather than from current. This PR fixes it. --- .github/actions/breeze/action.yml | 4 ++++ .github/workflows/publish-docs-to-s3.yml | 41 +++++++++++++++++--------------- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/.github/actions/breeze/action.yml b/.github/actions/breeze/action.yml index 49d57c8074b..a266ece46d3 100644 --- a/.github/actions/breeze/action.yml +++ b/.github/actions/breeze/action.yml @@ -25,6 +25,9 @@ inputs: uv-version: description: 'uv version to use' default: "0.10.2" # Keep this comment to allow automatic replacement of uv version + skip-cleanup: + description: 'Skip the free space cleanup step' + default: "false" outputs: host-python-version: description: Python version used in host @@ -53,6 +56,7 @@ runs: run: breeze ci free-space env: AIRFLOW_ROOT_PATH: "${{ github.workspace }}" + if: ${{ inputs.skip-cleanup != 'true' }} - name: "Get Python version" shell: bash run: > diff --git a/.github/workflows/publish-docs-to-s3.yml b/.github/workflows/publish-docs-to-s3.yml index 2f5f30b07bc..dc1d4148d12 100644 --- a/.github/workflows/publish-docs-to-s3.yml +++ b/.github/workflows/publish-docs-to-s3.yml @@ -182,6 +182,13 @@ jobs: with: persist-credentials: false path: current-version + - name: "Free up disk space" + shell: bash + run: ./current-version/scripts/tools/free_up_disk_space.sh + - name: "Make /mnt writeable" + run: ./current-version/scripts/ci/make_mnt_writeable.sh + - name: "Move docker to /mnt" + run: ./current-version/scripts/ci/move_docker_to_mnt.sh # We are checking repo for both - breeze and docs from the ref provided as input # This will take longer as we need to rebuild CI image and it will not use cache # but it will build the CI image from the version of Airflow that is used to check out things @@ -192,13 +199,6 @@ jobs: ref: ${{ inputs.ref }} fetch-depth: 0 fetch-tags: true - - name: "Free up disk space" - shell: bash - run: ./scripts/tools/free_up_disk_space.sh - - name: "Make /mnt writeable" - run: ./scripts/ci/make_mnt_writeable.sh - - name: "Move docker to /mnt" - run: ./scripts/ci/move_docker_to_mnt.sh - name: "Apply patch commits if provided" run: | if [[ "${APPLY_COMMITS}" != "" ]]; then @@ -242,24 +242,32 @@ jobs: INCLUDE_COMMITS: ${{ startsWith(inputs.ref, 'providers') && 'true' || 'false' }} run: > breeze build-docs ${INCLUDE_DOCS} --docs-only + - name: "Saving build docs folder" + run: | + if [ -d "generated/_build/" ]; then + mv "generated/_build/" "/tmp/_build" + elif [ -d "docs/_build/" ]; then + # handle Airflow 2 case + mv "docs/_build/" "/tmp/_build" + fi - name: "Checkout current version to run SBOM generation" uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: false fetch-depth: 0 fetch-tags: true - path: current-version - if: inputs.build-sboms - - name: "Reinstall breeze from the current version" - run: | - breeze setup self-upgrade --use-current-airflow-sources if: inputs.build-sboms - working-directory: current-version + - name: "Install Breeze from the current version" + uses: ./.github/actions/breeze + with: + python-version: "${{ needs.build-info.outputs.default-python-version }}" + skip-cleanup: "true" + - name: "Restore build docs folder to generated/_build" + run: mv /tmp/_build generated/_build - name: "Make sure SBOM dir exists and has the right permissions" run: | sudo mkdir -vp ./files/sbom sudo chown -R "${USER}" . - working-directory: current-version if: inputs.build-sboms - name: "Prepare SBOMs using current version of Breeze" env: @@ -271,17 +279,12 @@ jobs: breeze sbom update-sbom-information --airflow-version ${AIRFLOW_VERSION} --remote-name origin --force --all-combinations --run-in-parallel --airflow-root-path "${GITHUB_WORKSPACE}" - working-directory: current-version if: inputs.build-sboms - name: "Generated SBOM files" run: | echo "Generated SBOM files:" find ./generated/_build/docs/apache-airflow/stable/sbom/ -type f | sort if: inputs.build-sboms - - name: "Reinstall breeze from ${{ inputs.ref }} reference" - run: - breeze setup self-upgrade --use-current-airflow-sources - if: inputs.build-sboms - name: Check disk space available run: df -H # Here we will create temp airflow-site dir to publish docs
