Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
name: nightly-copr
name: copr-build-test

on:
schedule:
- cron: "0 1 * * *"
workflow_dispatch:
workflow_call:
inputs:
ushift-git-url:
description: "MicroShift git repository URL"
type: string
default: "https://github.com/openshift/microshift.git"
ushift-gitref:
description: "MicroShift git ref (branch or tag)"
type: string
default: "main"
copr-repo-name:
description: COPR repository name
default: "@microshift-io/microshift-nightly"
description: "COPR repository name"
type: string
required: true
bootc-image-tag:
description: "Bootc base image tag"
type: string
default: "stream10"

secrets:
COPR_CONFIG:
required: true

env:
COPR_REPO_NAME: ${{ github.event.inputs.copr-repo-name || '@microshift-io/microshift-nightly' }}
COPR_REPO_NAME: ${{ inputs.copr-repo-name }}

jobs:
build-dependencies-rpm:
if: github.event_name != 'schedule' || github.repository == 'microshift-io/microshift'
runs-on: ubuntu-24.04
steps:
- name: Check out MicroShift upstream repository
Expand Down Expand Up @@ -56,7 +69,6 @@ jobs:


build-rpms:
if: github.event_name != 'schedule' || github.repository == 'microshift-io/microshift'
runs-on: ubuntu-24.04
steps:
- name: Check out MicroShift upstream repository
Expand All @@ -71,7 +83,8 @@ jobs:
run: |
cd ${GITHUB_WORKSPACE}/
make srpm \
USHIFT_GITREF=main \
USHIFT_GIT_URL="${{ inputs.ushift-git-url }}" \
USHIFT_GITREF="${{ inputs.ushift-gitref }}" \
OKD_VERSION_TAG=${{ steps.detect-okd-version.outputs.okd-version-tag }} \
SRPM_WORKDIR=/mnt/srpm

Expand Down Expand Up @@ -122,7 +135,6 @@ jobs:

build-and-test-microshift:
needs: build-rpms
if: github.event_name != 'schedule' || github.repository == 'microshift-io/microshift'
strategy:
matrix:
runners: [ubuntu-24.04, ubuntu-24.04-arm]
Expand Down Expand Up @@ -161,7 +173,7 @@ jobs:
ushift-gitref: nil # RPMs are not built, so no need for git ref or OKD version
okd-version-tag: nil
bootc-image-url: quay.io/centos-bootc/centos-bootc
bootc-image-tag: stream10
bootc-image-tag: ${{ inputs.bootc-image-tag }}
skip-prebuild: "true"
build: bootc-image

Expand All @@ -177,7 +189,6 @@ jobs:

regenerate-copr-repo:
needs: build-and-test-microshift
if: github.event_name != 'schedule' || github.repository == 'microshift-io/microshift'
runs-on: ubuntu-24.04
steps:
- name: Check out MicroShift upstream repository
Expand All @@ -188,7 +199,7 @@ jobs:
env:
COPR_CONFIG: |
${{ secrets.COPR_CONFIG }}
run : |
run: |
echo "${COPR_CONFIG}" > /tmp/copr-config
make copr-regenerate-repos \
COPR_CONFIG=/tmp/copr-config \
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/copr-experimental.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: experimental-copr

on:
workflow_dispatch:
inputs:
fork-repo:
description: "Fork repository (e.g., pmtk/microshift)"
required: true
type: string
branch:
description: "Branch name to build"
required: true
type: string
copr-repo:
description: "COPR repository name (e.g., @microshift-io/experimental-c2cc)"
required: true
type: string

jobs:
copr-pipeline:
uses: ./.github/workflows/copr-build-and-test.yaml
with:
ushift-git-url: "https://github.com/${{ inputs.fork-repo }}.git"
ushift-gitref: ${{ inputs.branch }}
copr-repo-name: ${{ inputs.copr-repo }}
bootc-image-tag: stream9
secrets:
COPR_CONFIG: ${{ secrets.COPR_CONFIG }}
21 changes: 21 additions & 0 deletions .github/workflows/copr-nightly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: nightly-copr

on:
schedule:
- cron: "0 1 * * *"
workflow_dispatch:
inputs:
copr-repo-name:
description: COPR repository name
default: "@microshift-io/microshift-nightly"
type: string

jobs:
copr-pipeline:
if: github.event_name != 'schedule' || github.repository == 'microshift-io/microshift'
uses: ./.github/workflows/copr-build-and-test.yaml
with:
copr-repo-name: ${{ github.event.inputs.copr-repo-name || '@microshift-io/microshift-nightly' }}
bootc-image-tag: stream10
secrets:
COPR_CONFIG: ${{ secrets.COPR_CONFIG }}
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
ARCH := $(shell uname -m)

# Options used in the 'rpm' target
USHIFT_GIT_URL ?= https://github.com/openshift/microshift.git
USHIFT_GITREF ?= main
ifeq ($(ARCH),aarch64)
OKD_VERSION_TAG ?= $$(./src/okd/get_version.sh latest-arm64)
Expand Down Expand Up @@ -87,6 +88,7 @@ srpm:
@echo "Building the MicroShift SRPM image"
sudo podman build \
-t "${SRPM_IMAGE}" \
--build-arg USHIFT_GIT_URL="${USHIFT_GIT_URL}" \
--build-arg USHIFT_GITREF="${USHIFT_GITREF}" \
--build-arg OKD_VERSION_TAG="${OKD_VERSION_TAG}" \
--build-arg OKD_RELEASE_IMAGE_X86_64="${OKD_RELEASE_IMAGE_X86_64}" \
Expand Down
2 changes: 1 addition & 1 deletion src/copr/microshift-io-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Release: 1%{?dist}
Summary: RPM repository configurations for MicroShift dependencies

License: Apache-2.0
URL: https://github.com/microshift-io/microshift-io
URL: https://github.com/microshift-io/microshift
BuildArch: noarch

%description
Expand Down
Loading