Skip to content

build-containers

build-containers #487

Workflow file for this run

name: build-containers
on:
workflow_dispatch:
inputs:
kolla_build_profile:
description: "Kolla profile(s) to build (e.g., 'base', 'ironic'), comma-separated"
kolla_build_pattern:
description: "Kolla image build pattern (e.g., '^ironic-')"
push:
type: choice
description: "Push images to registry? (true/false)"
required: true
default: 'false'
options:
- 'true'
- 'false'
tag:
description: "Override default tag"
env:
DOCKER_REGISTRY: ghcr.io
jobs:
build-containers:
environment: Chameleon CI
runs-on: ubuntu-latest
steps:
- name: Set profile argument from workflow inputs
if: github.event.inputs.kolla_build_profile != ''
run: echo "KOLLA_BUILD_PROFILE=${{ github.event.inputs.kolla_build_profile }}" >> $GITHUB_ENV
- name: Set pattern argument from workflow inputs
if: github.event.inputs.kolla_build_pattern != ''
run: echo "KOLLA_BUILD_PATTERN=${{ github.event.inputs.kolla_build_pattern }}" >> $GITHUB_ENV
- name: Set push argument from workflow inputs
if: github.event.inputs.push == 'true'
run: echo "SHOULD_PUSH=1" >> $GITHUB_ENV
- name: Set tag argument from workflow inputs
if: github.event.inputs.tag != ''
run: echo "DOCKER_TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
cache: 'pip' # caching pip dependencies
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
with:
install: true
- name: Login to Registry
uses: docker/login-action@v2
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run Kolla Build
run: |
./run.sh python3 build.py