build-images #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-images | |
on: | |
workflow_dispatch: | |
inputs: | |
kolla_version: | |
type: string | |
description: "Kolla version (tag or branch) to install (e.g. 'stable/2024.1')" | |
default: stable/2024.1 | |
kolla_build_profile: | |
type: string | |
description: "Kolla profile to invoke (e.g., 'custom')" | |
default: custom | |
tag: | |
type: string | |
description: "Tag for built container images (e.g. '2024.1-rocky-9')" | |
default: 2024.1-rocky-9 | |
env: | |
REGISTRY: quay.io | |
jobs: | |
build-images: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.9" | |
cache: "pip" | |
- name: Install dependencies | |
env: | |
KOLLA_VERSION: ${{ inputs.kolla_version }} | |
run: | | |
python3 -m venv venv | |
venv/bin/pip install -U pip | |
venv/bin/pip install -r requirements.txt | |
venv/bin/pip install git+https://opendev.org/openstack/kolla@$KOLLA_VERSION | |
- name: Login to Registry | |
uses: docker/#-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ secrets.QUAY_IO_USERNAME }} | |
password: ${{ secrets.QUAY_IO_TOKEN }} | |
- name: Run Kolla Build | |
env: | |
KOLLA_PROFILE: ${{ inputs.kolla_build_profile }} | |
KOLLA_TAG: ${{ inputs.tag }} | |
run: | | |
venv/bin/kolla-build --config-file kolla-build.conf --tag $KOLLA_TAG --profile $KOLLA_PROFILE --push |