git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] ci/github: add missing 'CI_JOB_IMAGE' env variable

From
Karthik Nayak <karthik.188@gmail.com>
Date
Mar 19, 2025, 16:33 UTC
Message-ID
<20250319163328.525284-1-karthik.188@gmail.com>
In-Reply-To
<Z9qNNq0p10YJCZYo@pks.im>

The CI setups of GitLab and GitHub use a common dependency management script 'ci/install-dependencies.sh'. The script install the necessary packages based on a combination of the "$distro" and "$jobname" env variables.

The "$distro" variable is derived from the "CI_JOB_IMAGE" env variable set by the CI configs. In the GitHub CI config, some of the jobs are missing this variable. For the 'Documentation' job which depends on 'meson' being installed, this raises an error since the 'meson' dependency is never installed.

Fix this by adding the 'CI_JOB_IMAGE' variable to all missing jobs. We don't add it the windows jobs, since they manager their dependency as part of the CI config and no further dependency management is needed.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
---

Junio, not sure if you wanted a patch here, since you already had a fix yourself. But I'm providing one nonetheless, feel free to drop it.

 .github/workflows/main.yml | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 9959b61ece..37541f3d10 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -349,6 +349,7 @@ jobs:
     if: needs.ci-config.outputs.enabled == 'yes'
     env:
       CC: clang
+      CI_JOB_IMAGE: ubuntu-latest
     runs-on: ubuntu-latest
     steps:
     - uses: actions/checkout@v4
@@ -432,6 +433,7 @@ jobs:
     if: needs.ci-config.outputs.enabled == 'yes'
     env:
       jobname: StaticAnalysis
+      CI_JOB_IMAGE: ubuntu-22.04
     runs-on: ubuntu-22.04
     concurrency:
       group: static-analysis-${{ github.ref }}
@@ -446,6 +448,7 @@ jobs:
     if: needs.ci-config.outputs.enabled == 'yes'
     env:
       jobname: sparse
+      CI_JOB_IMAGE: ubuntu-20.04
     runs-on: ubuntu-20.04
     concurrency:
       group: sparse-${{ github.ref }}
@@ -473,6 +476,7 @@ jobs:
       cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
     env:
       jobname: Documentation
+      CI_JOB_IMAGE: ubuntu-latest
     runs-on: ubuntu-latest
     steps:
     - uses: actions/checkout@v4
-- 
2.48.1
Previous: Karthik NayakNext: Patrick Steinhardt
Message 10 of 15 in “What's cooking in git.git (Mar 2025, #04; Fri, 14)”
  1. Junio C HamanoMar 14, 2025
  2. Jeff KingMar 14, 2025
  3. Jeff KingMar 14, 2025
  4. Junio C HamanoMar 15, 2025
  5. install meson for Documentation jobJunio C Hamano, Mar 18, 2025
  6. Karthik NayakMar 18, 2025
  7. Junio C HamanoMar 18, 2025
  8. Patrick SteinhardtMar 19, 2025
  9. Karthik NayakMar 19, 2025
  10. ci/github: add missing 'CI_JOB_IMAGE' env variableKarthik Nayak, Mar 19, 2025
  11. Patrick SteinhardtMar 20, 2025
  12. Junio C HamanoMar 21, 2025
  13. Junio C HamanoMar 20, 2025
  14. en/diff-rename-follow-fix (Was: Re: What's cooking in git.git (Mar 2025, #04; Fri, 14))Elijah Newren, Mar 15, 2025
  15. Junio C HamanoMar 15, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.