From f6e21e280692c1d02f229de0064271ec575c43a0 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 20 Jul 2022 18:39:16 +0000 Subject: [PATCH] Build/Test Tools: Make the GitHub Action pattern matching for tags more specific. This improves the tag pattern matching for GitHub Action workflows to be more specific. The `*` wildcard in the current patterns matches any character except slash (`/`). While this correctly matches a version like `X.Y.Z`, it could also match non-numeric characters. This changes patterns to use the `+` character, which matches one or more of the preceding characters (`[0-9]` in this case). See #55652. git-svn-id: https://develop.svn.wordpress.org/trunk@53736 602fd350-edb4-49c9-b593-d223f7449a82 --- .github/workflows/coding-standards.yml | 5 +++-- .github/workflows/end-to-end-tests.yml | 6 ++++-- .github/workflows/javascript-tests.yml | 5 +++-- .github/workflows/php-compatibility.yml | 6 ++++-- .github/workflows/phpunit-tests.yml | 4 ++-- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index fd0964d800..496d86eb1b 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -9,8 +9,9 @@ on: - '3.[89]' - '[4-9].[0-9]' tags: - - '3.[89]*' - - '[4-9].[0-9]*' + - '[0-9]+.[0-9]' + - '[0-9]+.[0-9].[0-9]+' + - '!3.7.[0-9]+' pull_request: branches: - trunk diff --git a/.github/workflows/end-to-end-tests.yml b/.github/workflows/end-to-end-tests.yml index 12102d291e..22d0d71716 100644 --- a/.github/workflows/end-to-end-tests.yml +++ b/.github/workflows/end-to-end-tests.yml @@ -8,8 +8,10 @@ on: - '5.[3-9]' - '[6-9].[0-9]' tags: - - '5.[3-9]*' - - '[6-9].[0-9]*' + - '[0-9]+.[0-9]' + - '[0-9]+.[0-9].[0-9]+' + - '![34].[0-9].[0-9]+' + - '!5.[0-2].[0-9]+' pull_request: branches: - trunk diff --git a/.github/workflows/javascript-tests.yml b/.github/workflows/javascript-tests.yml index 5cbfbc6c57..5fc3a94d2c 100644 --- a/.github/workflows/javascript-tests.yml +++ b/.github/workflows/javascript-tests.yml @@ -8,8 +8,9 @@ on: - '3.[89]' - '[4-9].[0-9]' tags: - - '3.[89]*' - - '[4-9].[0-9]*' + - '[0-9]+.[0-9]' + - '[0-9]+.[0-9].[0-9]+' + - '!3.7.[0-9]+' pull_request: branches: - trunk diff --git a/.github/workflows/php-compatibility.yml b/.github/workflows/php-compatibility.yml index 145fba4ea6..69f67277f2 100644 --- a/.github/workflows/php-compatibility.yml +++ b/.github/workflows/php-compatibility.yml @@ -8,8 +8,10 @@ on: - '5.[5-9]' - '[6-9].[0-9]' tags: - - '5.[5-9]*' - - '[6-9].[0-9]*' + - '[0-9]+.[0-9]' + - '[0-9]+.[0-9].[0-9]+' + - '![34].[0-9].[0-9]+' + - '!5.[0-4].[0-9]+' pull_request: branches: - trunk diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 98e9f18090..1c2230ba19 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -7,8 +7,8 @@ on: - '3.[7-9]' - '[4-9].[0-9]' tags: - - '3.[7-9]*' - - '[4-9].[0-9]*' + - '[0-9]+.[0-9]' + - '[0-9]+.[0-9].[0-9]+' pull_request: branches: - trunk