Re: [PATCH] .github/workflows/tf_testsuite.yml: skip testing farm on pull requests

Ondrej Mosnacek <[email protected]>
Newsgroups org.kernel.vger.selinux
Message-ID <CAFqZXNu4D3setEk7vgUpiPt0R=Uuy3QMrWZq4+49NF2kCcAatQ@mail.gmail.com>
On Thu, Aug 13, 2026 at 9:13 PM Stephen Smalley
<[email protected]> wrote:
>
> The testing farm requires a repository secret that is not exposed to
> pull request runs from a fork, causing these checks to fail on every
> pull request from a fork. Skip these checks instead in that case.
>
> Signed-off-by: Stephen Smalley <[email protected]>
> ---
>  .github/workflows/tf_testsuite.yml | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/.github/workflows/tf_testsuite.yml b/.github/workflows/tf_testsuite.yml
> index 7e3993d3..3d7cf081 100644
> --- a/.github/workflows/tf_testsuite.yml
> +++ b/.github/workflows/tf_testsuite.yml
> @@ -5,6 +5,9 @@ on: [push, pull_request]
>  jobs:
>    tf_testsuite:
>      runs-on: ubuntu-latest
> +    # TESTING_FARM_API_TOKEN is a repository secret, which GitHub does not
> +    # expose on pull_request runs from forks; skip those rather than fail.
> +    if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
>      strategy:
>        fail-fast: false
>        matrix:
> --
> 2.55.0

Acked-by: Ondrej Mosnacek <[email protected]>

-- 
Ondrej Mosnacek
Senior Software Engineer, Linux Security - SELinux kernel
Red Hat, Inc.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.