Copr automation scripts for CI. This is meant to be used by LizardByte CI/CD pipeline.
You can replicate this in your own org, by following the examples here.
-
Create 3 projects/repos in copr
<org>/pulls(fired on pull_request events)<org>/beta(fired on prereleased events)<org>/stable(fired on released events)
-
Add a workflow to your repo, like so.
--- name: CI Copr on: pull_request: branches: - master types: - opened - synchronize - reopened release: types: - prereleased - released concurrency: group: "${{ github.workflow }}-${{ github.ref }}" cancel-in-progress: true jobs: call-copr-ci: uses: LizardByte/copr-ci/.github/workflows/copr-ci.yml@master with: copr_pr_webhook_token: "<fill in your pr token>" github_org_owner: "<fill in your org>" copr_ownername: "<fill in your copr owner>" auto_update_package: true job_timeout: 60 secrets: COPR_BETA_WEBHOOK_TOKEN: ${{ secrets.COPR_BETA_WEBHOOK_TOKEN }} COPR_STABLE_WEBHOOK_TOKEN: ${{ secrets.COPR_STABLE_WEBHOOK_TOKEN }} COPR_CLI_CONFIG: ${{ secrets.COPR_CLI_CONFIG }}
-
Add the following secrets to the org:
COPR_BETA_WEBHOOK_TOKENCOPR_STABLE_WEBHOOK_TOKENCOPR_CLI_CONFIG- See https://copr.fedorainfracloud.org/api
NOTE: The webhook secrets should only be the token portion of the webhook URL, not the full URL.
-
Optionally, add the following to the top of the spec file:
# sed will replace these values %global build_version 0 %global branch 0 %global commit 0 Version: %{build_version} -
Optionally, add a
.copr-cifile to the root of your repo to exclude submodules or directories from the build. This is useful for reducing the size of the source tarball when large submodules are not needed for packaging. Each non-empty, non-comment line is treated as a path relative to the repo root to exclude.# .copr-ci - paths to exclude from the copr build tarball # Lines starting with '#' are comments and are ignored. # exclude an entire submodule third-party/build-deps # exclude a specific subdirectory inside a submodule third-party/build-deps/third-party/FFmpeg/AMF/ThirdpartyExcluded paths are:
- Not initialized as submodules (never cloned, saving time and bandwidth).
- Excluded from the generated source tarball passed to rpmbuild.