feat: initial copr-publish composite action
Wraps copr-cli submit/watch/download-build with per-chroot log dumping as collapsible ::group:: blocks. Moves the logic previously living at .gitea/scripts/copr-build.sh in helexa/cortex into a reusable action so every consumer gets live log visibility and consistent failure diagnostics. Inputs: project, srpm (glob OK), copr-config (secret). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
44
action.yml
Normal file
44
action.yml
Normal file
@@ -0,0 +1,44 @@
|
||||
name: 'Publish to Fedora COPR'
|
||||
description: >
|
||||
Submit a source RPM to Fedora COPR, watch the build through to
|
||||
completion, and dump each chroot's builder-live.log into the CI
|
||||
output as collapsible groups.
|
||||
author: 'helexa'
|
||||
|
||||
branding:
|
||||
icon: package
|
||||
color: blue
|
||||
|
||||
inputs:
|
||||
project:
|
||||
description: 'COPR project in the form <owner>/<project> (e.g. helexa/cortex).'
|
||||
required: true
|
||||
srpm:
|
||||
description: >
|
||||
Path(s) to the source RPM(s) to submit. Glob patterns are expanded
|
||||
by the shell, so '*.src.rpm' is fine.
|
||||
required: true
|
||||
copr-config:
|
||||
description: >
|
||||
Contents of ~/.config/copr — obtain from
|
||||
https://copr.fedorainfracloud.org/api/ and pass via secrets.
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Configure copr-cli
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p ~/.config
|
||||
umask 077
|
||||
printf '%s\n' "${{ inputs.copr-config }}" > ~/.config/copr
|
||||
|
||||
- name: Submit build and stream logs
|
||||
shell: bash
|
||||
env:
|
||||
COPR_PROJECT: ${{ inputs.project }}
|
||||
COPR_SRPM: ${{ inputs.srpm }}
|
||||
run: |
|
||||
# shellcheck disable=SC2086
|
||||
bash "${{ github.action_path }}/scripts/copr-build.sh" "$COPR_PROJECT" $COPR_SRPM
|
||||
Reference in New Issue
Block a user