1- name : nightly- copr
1+ name : copr-build-test
22
33on :
4- schedule :
5- - cron : " 0 1 * * *"
6- workflow_dispatch :
4+ workflow_call :
75 inputs :
6+ ushift-git-url :
7+ description : " MicroShift git repository URL"
8+ type : string
9+ default : " https://github.com/openshift/microshift.git"
10+ ushift-gitref :
11+ description : " MicroShift git ref (branch or tag)"
12+ type : string
13+ default : " main"
814 copr-repo-name :
9- description : COPR repository name
10- default : " @microshift-io/microshift-nightly"
15+ description : " COPR repository name"
16+ type : string
17+ required : true
18+ bootc-image-tag :
19+ description : " Bootc base image tag"
1120 type : string
21+ default : " stream10"
22+
23+ secrets :
24+ COPR_CONFIG :
25+ required : true
1226
1327env :
14- COPR_REPO_NAME : ${{ github.event. inputs.copr-repo-name || '@microshift-io/microshift-nightly' }}
28+ COPR_REPO_NAME : ${{ inputs.copr-repo-name }}
1529
1630jobs :
1731 build-dependencies-rpm :
18- if : github.event_name != 'schedule' || github.repository == 'microshift-io/microshift'
1932 runs-on : ubuntu-24.04
2033 steps :
2134 - name : Check out MicroShift upstream repository
5669
5770
5871 build-rpms :
59- if : github.event_name != 'schedule' || github.repository == 'microshift-io/microshift'
6072 runs-on : ubuntu-24.04
6173 steps :
6274 - name : Check out MicroShift upstream repository
7183 run : |
7284 cd ${GITHUB_WORKSPACE}/
7385 make srpm \
74- USHIFT_GITREF=main \
86+ USHIFT_GIT_URL="${{ inputs.ushift-git-url }}" \
87+ USHIFT_GITREF="${{ inputs.ushift-gitref }}" \
7588 OKD_VERSION_TAG=${{ steps.detect-okd-version.outputs.okd-version-tag }} \
7689 SRPM_WORKDIR=/mnt/srpm
7790
@@ -122,7 +135,6 @@ jobs:
122135
123136 build-and-test-microshift :
124137 needs : build-rpms
125- if : github.event_name != 'schedule' || github.repository == 'microshift-io/microshift'
126138 strategy :
127139 matrix :
128140 runners : [ubuntu-24.04, ubuntu-24.04-arm]
@@ -161,7 +173,7 @@ jobs:
161173 ushift-gitref : nil # RPMs are not built, so no need for git ref or OKD version
162174 okd-version-tag : nil
163175 bootc-image-url : quay.io/centos-bootc/centos-bootc
164- bootc-image-tag : stream10
176+ bootc-image-tag : ${{ inputs.bootc-image-tag }}
165177 skip-prebuild : " true"
166178 build : bootc-image
167179
@@ -177,7 +189,6 @@ jobs:
177189
178190 regenerate-copr-repo :
179191 needs : build-and-test-microshift
180- if : github.event_name != 'schedule' || github.repository == 'microshift-io/microshift'
181192 runs-on : ubuntu-24.04
182193 steps :
183194 - name : Check out MicroShift upstream repository
@@ -188,7 +199,7 @@ jobs:
188199 env :
189200 COPR_CONFIG : |
190201 ${{ secrets.COPR_CONFIG }}
191- run : |
202+ run : |
192203 echo "${COPR_CONFIG}" > /tmp/copr-config
193204 make copr-regenerate-repos \
194205 COPR_CONFIG=/tmp/copr-config \
0 commit comments