Skip to content

chore: add crc-builder spec #2

chore: add crc-builder spec

chore: add crc-builder spec #2

name: snc-runner-oci-builder
on:
push:
# branches: [ main ]
tags: [ '*' ]
paths: [ 'snc-runner/**', '.github/workflows/snc-runner*' ]
pull_request:
branches: [ main ]
paths: [ 'snc-runner/**', '.github/workflows/snc-runner*' ]
jobs:
build:
name: build-pr
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build image for PR
if: ${{ github.event_name == 'pull_request' }}
shell: bash
env:
SNC_RUNNER: ghcr.io/crc-org/ci-definitions
SNC_RUNNER_V: pr-${{ github.event.number }}
run: |
make snc-runner-oci-build
SNC_RUNNER_FILE=snc-runner.tar make snc-runner-oci-save
echo $(SNC_RUNNER):$(SNC_RUNNER_V) > snc-runner-info
- name: Build image for Release
if: ${{ github.event_name == 'push' }}
shell: bash
run: |
make snc-runner-oci-build
SNC_RUNNER_FILE=snc-runner.tar make snc-runner-oci-save
SNC_RUNNER ?= $(sed -n 1p snc-runner/release-info)
SNC_RUNNER_V ?= v$(sed -n 2p snc-runner/release-info)
echo $(SNC_RUNNER):$(SNC_RUNNER_V) > snc-runner-info
- name: Upload snc-runner
uses: actions/upload-artifact@v4
with:
name: snc-runner
path: snc-runner*