Skip to content
Merged
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
37 changes: 20 additions & 17 deletions .github/workflows/copr-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ on:
workflow_dispatch:
inputs:
chroots:
description: "COPR chroots to target (space-separated)"
description: "COPR chroots to target (space-separated). Leave empty to use the default list from packaging/copr/build-copr.sh."
required: false
default: "fedora-rawhide-aarch64 fedora-rawhide-x86_64 fedora-44-aarch64 fedora-44-x86_64 fedora-43-aarch64 fedora-43-x86_64 fedora-42-aarch64 fedora-42-x86_64 epel-10-aarch64 epel-10-x86_64"
default: ""
type: string
use_serious_profile:
description: 'Use the "serious" profile for optimized builds (LTO enabled)'
Expand Down Expand Up @@ -36,22 +36,21 @@ jobs:
run: |
VERSION=$(./scripts/get-version.sh | sed 's/^v//')

if [ "${{ github.event_name }}" = "release" ]; then
CHROOTS="fedora-rawhide-aarch64 fedora-rawhide-x86_64 fedora-44-aarch64 fedora-44-x86_64 fedora-43-aarch64 fedora-43-x86_64 fedora-42-aarch64 fedora-42-x86_64 epel-10-aarch64 epel-10-x86_64"
else
CHROOTS="${{ inputs.chroots }}"
fi

{
echo "VERSION=${VERSION}"
echo "CHROOTS=${CHROOTS}"
echo "PACKAGE_NAME=${PACKAGE_NAME}"
echo "MAINTAINER_NAME=${{ vars.COPR_MAINTAINER_NAME || 'mise Release Bot' }}"
echo "MAINTAINER_EMAIL=${{ vars.COPR_MAINTAINER_EMAIL || 'noreply@mise.jdx.dev' }}"
echo "COPR_OWNER=${{ vars.COPR_OWNER || 'jdxcode' }}"
echo "COPR_PROJECT=${{ vars.COPR_PROJECT || 'mise' }}"
} >> "$GITHUB_ENV"

# Pass chroots through only when explicitly overridden via workflow_dispatch.
# Otherwise let build-copr.sh apply its own default list.
if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ inputs.chroots }}" ]; then
echo "CHROOTS=${{ inputs.chroots }}" >> "$GITHUB_ENV"
fi

# Set build profile
if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ "${{ inputs.use_serious_profile }}" = "true" ]; then
echo "BUILD_PROFILE=serious" >> "$GITHUB_ENV"
Expand All @@ -61,15 +60,19 @@ jobs:

- name: Build and submit to COPR
run: |
./packaging/copr/build-copr.sh \
--version "${VERSION}" \
--profile "${BUILD_PROFILE}" \
--chroots "${CHROOTS}" \
--owner "${COPR_OWNER}" \
--project "${COPR_PROJECT}" \
--name "${PACKAGE_NAME}" \
--maintainer-name "${MAINTAINER_NAME}" \
args=(
--version "${VERSION}"
--profile "${BUILD_PROFILE}"
--owner "${COPR_OWNER}"
--project "${COPR_PROJECT}"
--name "${PACKAGE_NAME}"
--maintainer-name "${MAINTAINER_NAME}"
--maintainer-email "${MAINTAINER_EMAIL}"
)
if [ -n "${CHROOTS:-}" ]; then
args+=(--chroots "${CHROOTS}")
fi
./packaging/copr/build-copr.sh "${args[@]}"
env:
COPR_API_LOGIN: ${{ secrets.COPR_API_LOGIN }}
COPR_API_TOKEN: ${{ secrets.COPR_API_TOKEN }}
Loading