From e3aafa9ff48ecd15ed0551c2adb896d3f618ace3 Mon Sep 17 00:00:00 2001 From: Pedro Brochado Date: Fri, 19 Dec 2025 13:53:07 -0300 Subject: [PATCH] Add apt-get update to avoid using invalid cached metadata When running 'apt-get install' without doing 'update' in a github runner, the runner might try to use it's cached metadata of the apt repository, which might be out of date and cause the CI to fail. --- templates/github/.github/workflows/build.yml.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/github/.github/workflows/build.yml.j2 b/templates/github/.github/workflows/build.yml.j2 index a49def96..eb4e1870 100644 --- a/templates/github/.github/workflows/build.yml.j2 +++ b/templates/github/.github/workflows/build.yml.j2 @@ -26,6 +26,7 @@ jobs: {%- if os_required_packages %} - name: "Install OS packages" run: | + sudo apt-get update sudo apt-get install -y {{ os_required_packages|join(' ') }} {%- endif %} - name: "Build package"