Skip to content

Automate production of CAPI VM images #2

Automate production of CAPI VM images

Automate production of CAPI VM images #2

name: Build CAPI image builder
on:
push:
branches:
- main
pull_request:
env:
IMAGE_NAME: image-builder
REGISTRY: ghcr.io/elastisys
jobs:
build-image-builder:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Get branch name
id: get-branch-name
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_OUTPUT
else
echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
fi
shell: bash
- name: run make docker-build
run: make docker-build
env:
TAG: ${{ steps.get-branch-name.outputs.BRANCH_NAME }}-${{ github.sha }}
- name: run make docker-push
run: make docker-push
env:
TAG: ${{ steps.get-branch-name.outputs.BRANCH_NAME }}-${{ github.sha }}