Re: [PATCH 1/2] ci: allow branch selection through "vars"
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Sep 3, 2023, 08:59 UTC
- Message-ID
- <d000f469-2b7d-e037-c92e-013034490461@gmx.de>
- In-Reply-To
- <20230830195113.GA1709824@coredump.intra.peff.net>
Hi Jeff,
On Wed, 30 Aug 2023, Jeff King wrote:
Show 9 quoted lines
> diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml > index 1b41278a7f..c364abb8f8 100644 > --- a/.github/workflows/main.yml > +++ b/.github/workflows/main.yml > @@ -21,6 +21,7 @@ concurrency: > jobs: > ci-config: > name: config > + if: vars.CI_BRANCHES == '' || contains(vars.CI_BRANCHES, github.ref_name)
This might be too loose a check, as branch names that are a substring of any name listed in `CI_BRANCHES` would be false positive match. For example, if `CI_BRANCHES` was set to `maint next seen`, a branch called `see` would be a false match.
Due to the absence of a `concat()` function (for more details, see https://docs.github.com/en/actions/learn-github-actions/expressions#functions), I fear that we'll have to resort to something like `contains(format(' {0} ', vars.CI_BRANCHES), format(' {0} ', github.ref_name))`.
Ciao, Johannes