d690d5aaa8a4c642ad964df5b828b560ea13e9f1
v1.0.3's heartbeat did its job: it showed exactly where the next failure was. In monsoon run 56 the heartbeats stopped at 14m29s while the build was still running, and the job was killed at 10:20:50 — five minutes after COPR had reported success at 10:15:20. The poll loop was blocked inside `$(build_state ...)`. copr-cli makes network requests with no internal timeout, so `copr-cli status` hung for over twelve minutes and took the loop with it. Same failure mode as watch-build in run 48, just relocated. Bound all of them: status (60s), submit (600s), download-build (600s), each overridable. A timed-out status yields empty output, which reads as non-terminal, so the loop simply heartbeats and retries on the next tick. Test reproduces it with a stub whose first status call hangs; it deadlocks against v1.0.3 and passes here.
copr-publish
Gitea composite action that submits a source RPM to Fedora COPR,
watches the build, and dumps each chroot's builder-live.log into the
CI output as collapsible groups.
Why use this
copr-cli build by itself only prints status transitions
(pending / importing / running / succeeded). When a build fails
you have to click through to the COPR web UI to see the actual log.
This action:
- Submits with
--nowaitand captures the build ID. - Prints a clickable
https://copr.fedorainfracloud.org/coprs/build/...link so you can follow live. - Streams status transitions from
copr-cli watch-buildwhile polling COPR for the build's actual state, so the job's verdict comes from the build rather than from the health of a long-lived connection. - On completion, fetches each chroot's
builder-live.logviacopr-cli download-buildand emits them as::group::blocks. - Fails CI if the build fails, but always dumps logs first.
- Gives up after
COPR_BUILD_TIMEOUT(default 7200s) and says so, rather than hanging until the runner kills the job.
Environment overrides
| Variable | Default | Purpose |
|---|---|---|
COPR_BUILD_TIMEOUT |
7200 |
Seconds to wait for a build to reach a terminal state. |
COPR_POLL_INTERVAL |
30 |
Seconds between build-state polls. |
Requirements
The runner must already have:
copr-clionPATH(provided by thecopr-cliRPM on Fedora runners).grep -P(PCRE, default on Fedora).
Inputs
| Input | Required | Description |
|---|---|---|
project |
yes | COPR project in the form <owner>/<project>, e.g. helexa/cortex. |
srpm |
yes | Path or glob to the source RPM(s) to submit, e.g. *.src.rpm. |
copr-config |
yes | Contents of ~/.config/copr. Fetch from https://copr.fedorainfracloud.org/api/ and store as a repo or org secret. |
Usage
jobs:
publish:
runs-on: fedora
steps:
- uses: actions/download-artifact@v3
with:
name: my-srpm
- name: Publish to COPR
uses: https://git.lair.cafe/actions/copr-publish@v1
with:
project: helexa/cortex
srpm: '*.src.rpm'
copr-config: ${{ secrets.COPR_CONFIG }}
Note the fully-qualified URL in uses: — the Gitea instance's
DEFAULT_ACTIONS_URL points at github.com, so internal actions must be
referenced by absolute URL.
Versioning
Pin to a major version tag (@v1) for automatic patch/minor updates.
Pin to an exact tag (@v1.0.3) to freeze.
Obtaining COPR_CONFIG
- Log in to https://copr.fedorainfracloud.org/.
- Visit https://copr.fedorainfracloud.org/api/.
- Copy the entire
[copr-cli]config block. - Save as a Gitea secret named
COPR_CONFIGin the consuming repo (or at org level to share across all org repos).
Description
Languages
Shell
100%