ci: always update apt cache before installing pkgs
authorVincent Fu <vincent.fu@samsung.com>
Tue, 15 Oct 2024 15:21:49 +0000 (11:21 -0400)
committerVincent Fu <vincent.fu@samsung.com>
Tue, 15 Oct 2024 15:29:18 +0000 (11:29 -0400)
For all of our custom local actions make sure we update the apt cache
before trying to install packages. This will prevent errors when the
runner is started with a stale apt cache.

Example: https://github.com/vincentkfu/fio/actions/runs/11339008514/job/31533113877

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
.github/actions/build-qemu/action.yml
.github/actions/create-guest-image/action.yml
.github/actions/start-vm/action.yml

index 06804b8b2265caf2e297bf8e66f5efd95bde0372..279a8ed71eb74a45c78a65cb2e86db0e5e698c81 100644 (file)
@@ -12,7 +12,7 @@ runs:
   using: "composite"
   steps:
     - name: Install QEMU build dependencies
-      run: sudo apt-get -qq install libglib2.0-dev libfdt-dev libpixman-1-dev ninja-build flex bison libsdl2-dev libaio-dev python3-tomli libslirp-dev
+      run: sudo apt update && sudo apt-get -qq install libglib2.0-dev libfdt-dev libpixman-1-dev ninja-build flex bison libsdl2-dev libaio-dev python3-tomli libslirp-dev
       shell: bash
 
     - name: Build and install QEMU
index ce41337873d80e0276b3168511259ee1ab5826b6..77be3a3cabeebc8dafa96345be9e68b3dc488f73 100644 (file)
@@ -15,7 +15,7 @@ runs:
   using: "composite"
   steps:
     - name: Install libguestfs
-      run: sudo apt-get -qq install libguestfs-tools
+      run: sudo apt update && sudo apt-get -qq install libguestfs-tools
       shell: bash
     - name: Setup steps for virt-builder
       run: |
index d47977c414586a7937b1025ffa8a596566853c9f..3449aac5bce197fd5d5bfa008255c090edf5bb41 100644 (file)
@@ -24,7 +24,7 @@ runs:
   steps:
     - name: install wait-for-it
       shell: bash
-      run: sudo apt-get -qq install wait-for-it
+      run: sudo apt update && sudo apt-get -qq install wait-for-it
     - name: Start VM in background
       shell: bash
       run: |