mirror of
https://github.com/apache/airflow.git
synced 2026-11-04 07:12:48 +00:00
* Bump the github-actions-updates group with 10 updates Bumps the github-actions-updates group with 10 updates: | Package | From | To | | --- | --- | --- | | [actions/setup-node](https://github.com/actions/setup-node) | `7.0.0` | `7.1.0` | | [actions/upload-artifact](https://github.com/actions/upload-artifact) | `7.0.1` | `7.0.2` | | [apache/infrastructure-actions/allowlist-check](https://github.com/apache/infrastructure-actions) | `1.0.0` | `1.0.1` | | [actions/download-artifact](https://github.com/actions/download-artifact) | `8.0.1` | `8.0.2` | | [apache/infrastructure-actions/stash/restore](https://github.com/apache/infrastructure-actions) | `1.0.0` | `1.0.1` | | [apache/infrastructure-actions/stash/save](https://github.com/apache/infrastructure-actions) | `1.0.0` | `1.0.1` | | [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) | `10.2.0` | `10.3.0` | | [github/codeql-action/init](https://github.com/github/codeql-action) | `4.38.2` | `4.38.3` | | [github/codeql-action/autobuild](https://github.com/github/codeql-action) | `4.38.2` | `4.38.3` | | [github/codeql-action/analyze](https://github.com/github/codeql-action) | `4.38.2` | `4.38.3` | Updates `actions/setup-node` from 7.0.0 to 7.1.0 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/820762786026740c76f36085b0efc47a31fe5020...949feb2413d6458794dcd2491c4babbbce0c15c1) Updates `actions/upload-artifact` from 7.0.1 to 7.0.2 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/043fb46d1a93c77aae656e7c1c64a875d1fc6a0a...cf430e030ddbb5b0abf93d22962f4752f3646cd9) Updates `apache/infrastructure-actions/allowlist-check` from 1.0.0 to 1.0.1 - [Commits](https://github.com/apache/infrastructure-actions/compare/61dcea11f19e2bbe1263f14d72235e8da17d3ad0...f1a487181effd0b216892001abdfb524442bb24d) Updates `actions/download-artifact` from 8.0.1 to 8.0.2 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c...9000827ccba6bdab643e8b6fd33ac0654aef8333) Updates `apache/infrastructure-actions/stash/restore` from 1.0.0 to 1.0.1 - [Commits](https://github.com/apache/infrastructure-actions/compare/61dcea11f19e2bbe1263f14d72235e8da17d3ad0...f1a487181effd0b216892001abdfb524442bb24d) Updates `apache/infrastructure-actions/stash/save` from 1.0.0 to 1.0.1 - [Commits](https://github.com/apache/infrastructure-actions/compare/61dcea11f19e2bbe1263f14d72235e8da17d3ad0...f1a487181effd0b216892001abdfb524442bb24d) Updates `astral-sh/setup-uv` from 10.2.0 to 10.3.0 - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/c18668ad3cf93ea998bef934396af7bb5c839dc7...1c37ad07a6a961277cf70c0d37d6f313000f5884) Updates `github/codeql-action/init` from 4.38.2 to 4.38.3 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2...24c54180a607b1449ed407dd24f251e4e9147c8d) Updates `github/codeql-action/autobuild` from 4.38.2 to 4.38.3 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2...24c54180a607b1449ed407dd24f251e4e9147c8d) Updates `github/codeql-action/analyze` from 4.38.2 to 4.38.3 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2...24c54180a607b1449ed407dd24f251e4e9147c8d) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-updates - dependency-name: actions/upload-artifact dependency-version: 7.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions-updates - dependency-name: apache/infrastructure-actions/allowlist-check dependency-version: 1.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions-updates - dependency-name: actions/download-artifact dependency-version: 8.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions-updates - dependency-name: apache/infrastructure-actions/stash/restore dependency-version: 1.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions-updates - dependency-name: apache/infrastructure-actions/stash/save dependency-version: 1.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions-updates - dependency-name: astral-sh/setup-uv dependency-version: 10.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-updates - dependency-name: github/codeql-action/init dependency-version: 4.38.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions-updates - dependency-name: github/codeql-action/autobuild dependency-version: 4.38.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions-updates - dependency-name: github/codeql-action/analyze dependency-version: 4.38.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions-updates ... Signed-off-by: dependabot[bot] <support@github.com> * Pin stash/restore and allowlist-check to their own v1.0.1 tag commits Dependabot pinned all apache/infrastructure-actions sub-actions to the save/v1.0.1 commit, so the restore and allowlist-check pins no longer matched their version comments. Generated-by: Claude Opus 5 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
236 lines
10 KiB
YAML
236 lines
10 KiB
YAML
# Licensed to the Apache Software Foundation (ASF) under one
|
|
# or more contributor license agreements. See the NOTICE file
|
|
# distributed with this work for additional information
|
|
# regarding copyright ownership. The ASF licenses this file
|
|
# to you under the Apache License, Version 2.0 (the
|
|
# "License"); you may not use this file except in compliance
|
|
# with the License. You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing,
|
|
# software distributed under the License is distributed on an
|
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
# KIND, either express or implied. See the License for the
|
|
# specific language governing permissions and limitations
|
|
# under the License.
|
|
#
|
|
---
|
|
name: "Release single PROD image"
|
|
on: # yamllint disable-line rule:truthy
|
|
workflow_call:
|
|
inputs:
|
|
airflowVersion:
|
|
description: 'Airflow version (e.g. 3.0.1, 3.0.1rc1, 3.0.1b1)'
|
|
type: string
|
|
required: true
|
|
platformMatrix:
|
|
description: 'Platform matrix formatted as json (e.g. ["linux/amd64", "linux/arm64"])'
|
|
type: string
|
|
required: true
|
|
pythonVersion:
|
|
description: 'Python version (e.g. 3.11, 3.12)'
|
|
type: string
|
|
required: true
|
|
skipLatest:
|
|
description: "Skip tagging latest release (true/false)"
|
|
type: string
|
|
required: true
|
|
amdRunners:
|
|
description: "Amd64 runners (e.g. [\"ubuntu-22.04\", \"ubuntu-24.04\"])"
|
|
type: string
|
|
required: true
|
|
armRunners:
|
|
description: "Arm64 runners (e.g. [\"ubuntu-22.04\", \"ubuntu-24.04\"])"
|
|
type: string
|
|
required: true
|
|
secrets:
|
|
DOCKERHUB_USER:
|
|
required: true
|
|
DOCKERHUB_TOKEN:
|
|
required: true
|
|
permissions:
|
|
contents: read
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
VERBOSE: true
|
|
jobs:
|
|
build-images:
|
|
timeout-minutes: 50
|
|
# yamllint disable rule:line-length
|
|
name: "Build: ${{ inputs.airflowVersion }}, ${{ inputs.pythonVersion }}, ${{ matrix.platform }}"
|
|
runs-on: ${{ (matrix.platform == 'linux/amd64') && fromJSON(inputs.amdRunners) || fromJSON(inputs.armRunners) }}
|
|
strategy:
|
|
fail-fast: false
|
|
max-parallel: 20
|
|
matrix:
|
|
platform: ${{ fromJSON(inputs.platformMatrix) }}
|
|
env:
|
|
AIRFLOW_VERSION: ${{ inputs.airflowVersion }}
|
|
PYTHON_MAJOR_MINOR_VERSION: ${{ inputs.pythonVersion }}
|
|
PLATFORM: ${{ matrix.platform }}
|
|
SKIP_LATEST: ${{ inputs.skipLatest == 'true' && '--skip-latest' || '' }}
|
|
COMMIT_SHA: ${{ github.sha }}
|
|
REPOSITORY: ${{ github.repository }}
|
|
steps:
|
|
- name: "Cleanup repo"
|
|
shell: bash
|
|
run: sudo rm -rf ${GITHUB_WORKSPACE}/*
|
|
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
- name: "Install Breeze"
|
|
uses: ./.github/actions/breeze
|
|
- name: Free space
|
|
run: breeze ci free-space --answer yes
|
|
- name: "Cleanup dist and context file"
|
|
run: rm -fv ./dist/* ./docker-context-files/*
|
|
- name: "Login to hub.docker.com"
|
|
run: >
|
|
echo ${{ secrets.DOCKERHUB_TOKEN }} |
|
|
docker login --password-stdin --username ${{ secrets.DOCKERHUB_USER }}
|
|
- name: "Get env vars for metadata"
|
|
shell: bash
|
|
run: |
|
|
echo "ARTIFACT_NAME=metadata-${PYTHON_MAJOR_MINOR_VERSION}-${PLATFORM/\//_}" >> "${GITHUB_ENV}"
|
|
echo "MANIFEST_FILE_NAME=metadata-${AIRFLOW_VERSION}-${PLATFORM/\//_}-${PYTHON_MAJOR_MINOR_VERSION}.json" >> "${GITHUB_ENV}"
|
|
echo "MANIFEST_SLIM_FILE_NAME=metadata-${AIRFLOW_VERSION}-slim-${PLATFORM/\//_}-${PYTHON_MAJOR_MINOR_VERSION}.json" >> "${GITHUB_ENV}"
|
|
- name: Login to ghcr.io
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
ACTOR: ${{ github.actor }}
|
|
run: echo "${GITHUB_TOKEN}" | docker login ghcr.io -u ${ACTOR} --password-stdin
|
|
- name: "Install buildx plugin"
|
|
# yamllint disable rule:line-length
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install ca-certificates curl
|
|
sudo install -m 0755 -d /etc/apt/keyrings
|
|
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
|
|
sudo chmod a+r /etc/apt/keyrings/docker.asc
|
|
|
|
# Add the repository to Apt sources:
|
|
echo \
|
|
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
|
|
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
|
|
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
|
sudo apt-get update
|
|
sudo apt install docker-buildx-plugin
|
|
- name: "Create airflow_cache builder"
|
|
run: docker buildx create --name airflow_cache --driver docker-container
|
|
- name: >
|
|
Build regular images: ${{ inputs.airflowVersion }}, ${{ inputs.pythonVersion }}, ${{ matrix.platform }}
|
|
run: >
|
|
breeze release-management release-prod-images --dockerhub-repo "${REPOSITORY}"
|
|
--airflow-version "${AIRFLOW_VERSION}" ${SKIP_LATEST}
|
|
--python ${PYTHON_MAJOR_MINOR_VERSION}
|
|
--metadata-folder dist
|
|
- name: >
|
|
Verify regular image: ${{ inputs.airflowVersion }}, ${{ inputs.pythonVersion }}, ${{ matrix.platform }}
|
|
run: >
|
|
breeze prod-image verify --pull --manifest-file dist/${MANIFEST_FILE_NAME}
|
|
- name: >
|
|
Release slim images: ${{ inputs.airflowVersion }}, ${{ inputs.pythonVersion }}, ${{ matrix.platform }}
|
|
run: >
|
|
breeze release-management release-prod-images --dockerhub-repo "${REPOSITORY}"
|
|
--airflow-version "${AIRFLOW_VERSION}" ${SKIP_LATEST}
|
|
--python ${PYTHON_MAJOR_MINOR_VERSION} --slim-images
|
|
--metadata-folder dist
|
|
- name: >
|
|
Verify slim image: ${{ inputs.airflowVersion }}, ${{ inputs.pythonVersion }}, ${{ matrix.platform }}
|
|
run: >
|
|
breeze prod-image verify --pull --slim-image --manifest-file dist/${MANIFEST_SLIM_FILE_NAME}
|
|
- name: "List upload-able artifacts"
|
|
shell: bash
|
|
run: find ./dist -name '*.json'
|
|
- name: "Upload metadata artifact ${{ env.ARTIFACT_NAME }}"
|
|
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
with:
|
|
name: ${{ env.ARTIFACT_NAME }}
|
|
path: ./dist/metadata-*
|
|
retention-days: 7
|
|
if-no-files-found: error
|
|
- name: "Docker logout"
|
|
run: docker logout
|
|
if: always()
|
|
|
|
merge-images:
|
|
timeout-minutes: 5
|
|
name: "Merge: ${{ inputs.airflowVersion }}, ${{ inputs.pythonVersion }}"
|
|
runs-on: ["ubuntu-22.04"]
|
|
needs: [build-images]
|
|
env:
|
|
AIRFLOW_VERSION: ${{ inputs.airflowVersion }}
|
|
PYTHON_MAJOR_MINOR_VERSION: ${{ inputs.pythonVersion }}
|
|
SKIP_LATEST: ${{ inputs.skipLatest == 'true' && '--skip-latest' || '' }}
|
|
COMMIT_SHA: ${{ github.sha }}
|
|
REPOSITORY: ${{ github.repository }}
|
|
steps:
|
|
- name: "Cleanup repo"
|
|
shell: bash
|
|
run: sudo rm -rf ${GITHUB_WORKSPACE}/*
|
|
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
- name: "Install Breeze"
|
|
uses: ./.github/actions/breeze
|
|
- name: Free space
|
|
run: breeze ci free-space --answer yes
|
|
- name: "Cleanup dist and context file"
|
|
run: rm -fv ./dist/* ./docker-context-files/*
|
|
- name: "Login to hub.docker.com"
|
|
run: >
|
|
echo ${{ secrets.DOCKERHUB_TOKEN }} |
|
|
docker login --password-stdin --username ${{ secrets.DOCKERHUB_USER }}
|
|
- name: Login to ghcr.io
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
ACTOR: ${{ github.actor }}
|
|
run: echo "${GITHUB_TOKEN}" | docker login ghcr.io -u ${ACTOR} --password-stdin
|
|
- name: "Download metadata artifacts"
|
|
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
with:
|
|
path: ./dist
|
|
pattern: metadata-${{ inputs.pythonVersion }}-*
|
|
- name: "List downloaded artifacts"
|
|
shell: bash
|
|
run: find ./dist -name '*.json'
|
|
- name: "Install buildx plugin"
|
|
# yamllint disable rule:line-length
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install ca-certificates curl
|
|
sudo install -m 0755 -d /etc/apt/keyrings
|
|
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
|
|
sudo chmod a+r /etc/apt/keyrings/docker.asc
|
|
|
|
# Add the repository to Apt sources:
|
|
echo \
|
|
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
|
|
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
|
|
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
|
sudo apt-get update
|
|
sudo apt install docker-buildx-plugin
|
|
- name: "Install regctl"
|
|
# yamllint disable rule:line-length
|
|
run: |
|
|
mkdir -p ~/bin
|
|
curl -L https://github.com/regclient/regclient/releases/latest/download/regctl-linux-amd64 >${HOME}/bin/regctl
|
|
chmod 755 ${HOME}/bin/regctl
|
|
echo "${HOME}/bin" >>${GITHUB_PATH}
|
|
- name: "Merge regular images ${{ inputs.airflowVersion }}, ${{ inputs.pythonVersion }}"
|
|
run: >
|
|
breeze release-management merge-prod-images --dockerhub-repo "${REPOSITORY}"
|
|
--airflow-version "${AIRFLOW_VERSION}" ${SKIP_LATEST}
|
|
--python ${PYTHON_MAJOR_MINOR_VERSION} --metadata-folder dist
|
|
- name: "Merge slim images ${{ inputs.airflowVersion }}, ${{ inputs.pythonVersion }}"
|
|
run: >
|
|
breeze release-management merge-prod-images --dockerhub-repo "${REPOSITORY}"
|
|
--airflow-version "${AIRFLOW_VERSION}" ${SKIP_LATEST}
|
|
--python ${PYTHON_MAJOR_MINOR_VERSION} --metadata-folder dist --slim-images
|
|
- name: "Docker logout"
|
|
run: docker logout
|
|
if: always()
|