GitHub Actions introduced a new `case()` function in January that works just
like HAProxy’s `iif()` converter (just with an arbitrary number of
expressions). It is more robust than chaining strings with `&&` and `||`,
because it includes proper type-checking.

see 
https://github.blog/changelog/2026-01-29-github-actions-smarter-editing-clearer-debugging-and-a-new-case-function/#write-more-expressive-expressions-with-a-case-function
---
 .github/workflows/vtest.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/vtest.yml b/.github/workflows/vtest.yml
index 6113e4a3c..6b8eb80a9 100644
--- a/.github/workflows/vtest.yml
+++ b/.github/workflows/vtest.yml
@@ -76,9 +76,9 @@ jobs:
       run: |
         sudo apt-get update -o Acquire::Languages=none -o 
Acquire::Translation=none
         sudo apt-get --no-install-recommends -y install \
-          ${{ contains(matrix.FLAGS, 'USE_LUA=1')     && 'liblua5.4-dev'  || 
'' }} \
-          ${{ contains(matrix.FLAGS, 'USE_PCRE2=1')   && 'libpcre2-dev'   || 
'' }} \
-          ${{ contains(matrix.ssl,   'BORINGSSL=yes') && 'ninja-build'    || 
'' }} \
+          ${{ case(contains(matrix.FLAGS, 'USE_LUA=1'), 'liblua5.4-dev', '') 
}} \
+          ${{ case(contains(matrix.FLAGS, 'USE_PCRE2=1'), 'libpcre2-dev', '') 
}} \
+          ${{ case(contains(matrix.ssl, 'BORINGSSL=yes'), 'ninja-build', '') 
}} \
           socat \
           gdb \
           jose
-- 
2.53.0



Reply via email to