Skip to content

build-containers

build-containers #490

Workflow file for this run

name: build-containers
on:
workflow_dispatch:
inputs:
kolla_build_profile:
description: "Kolla profile to invoke (e.g., 'ironic')"
type: string
kolla_build_pattern:
description: "Kolla image build pattern (e.g., '^ironic-')"
type: string
push:
type: choice
description: "Push images to registry? (true/false)"
required: true
default: 'false'
options:
- 'true'
- 'false'
tag:
type: string
description: "Docker tag for built images, overrides default of git-sha"
env:
REGISTRY: ghcr.io
jobs:
build-containers:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: 'pip' # caching pip dependencies
- name: Install dependencies
run: |
python3 -m venv .venv
.venv/bin/pip install src/kolla
- name: Login to Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run Kolla Build
env:
BUILD_PROFILE: ${{ inputs.kolla_build_profile }}
BUILD_PATTERN: ${{ inputs.kolla_build_pattern }}
BUILD_TAG: ${{ inputs.tag }}
PUSH: ${{ inputs.push }}
run: |
./run.sh