Skip to content

A way to set specific branches triggered on push (commit). #664

@junaruga

Description

@junaruga

Description

I want to run Packit as a service on push for the specific branches. I want to trigger any branches except master branch. Below is my current .packit.yml configuration. Is there a way to do it? I check the https://dashboard.packit.dev/pipelines page. But it seems nothing triggers in the push for a branch with the following configuration. Does the current branch: syntax support the regular expression?

jobs:
  - &copr
    job: copr_build
    trigger: pull_request
    enable_net: true
    targets:
      # https://packit.dev/docs/configuration/#available-copr-build-targets
      - fedora-rawhide-x86_64
      - fedora-rawhide-i386
      - fedora-rawhide-aarch64
      - fedora-rawhide-ppc64le
      - fedora-rawhide-s390x

  - <<: *copr
    # Run on push to any branch.
    trigger: commit

Benefit

Users can test their commit by running on CI before sending the PR to the target repository.

Importance

GitHub Actions have the feature to set the triggered branches using the wildcard by branches and branches-ignore syntax.
https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#using-filters
https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#example-excluding-branches

Workaround

  • There is an existing workaround that can be used until this feature is implemented.

Participation

  • I am willing to submit a pull request for this issue. (Packit team is happy to help!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/generalNot tied to a specific areacomplexity/single-taskRegular task; should be done within daysgain/lowDoesn't bring much value to usersimpact/lowAffects only few of the userskind/documentationImprovements to docs

    Type

    No type

    Projects

    Status

    backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions