Skip to content

Commit

Permalink
Workaround Ubuntu 22.04/crun failure in CI
Browse files Browse the repository at this point in the history
See: actions/runner-images#9425
See: lp:2056442
Signed-off-by: Lucy Llewellyn <[email protected]>
  • Loading branch information
lucyllewy committed Mar 23, 2024
1 parent 13b50f0 commit a7a01bf
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/actions/fix-crun/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright (c) 2024 Markus Falb <[email protected]>
# GNU General Public License v3.0+
# see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt
---

# https://github.com/actions/runner-images/issues/9425
name: 'Fix crun'
description: 'Fix crun because of incompatible kernel'

inputs:
checksums:
description: 'The path to the CHECKSUM file'
type: string
required: true

runs:
using: composite
steps:
- name: patch crun
shell: bash
env:
URI: https://github.com/containers/crun/releases/download/1.14.4/crun-1.14.4-linux-amd64
CHECKSUMS: ${{ inputs.checksums }}
run: |
cd $(dirname "$CHECKSUMS")
test -f "$(basename $CHECKSUMS)"
test "$ImageOS" = "ubuntu22"
curl -Lo crun "$URI"
sha256sum -c "$(basename $CHECKSUMS)"
sudo install crun /usr/bin/crun
...
16 changes: 16 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,22 @@ on: # rebuild any PRs and main branch changes
- 'releases/*'

jobs:
fixcrun:
runs-on: ubuntu-22.04
steps:
- name: Checkout workflows
uses: actions/checkout@v4
- name: Install crun
uses: ./.github/actions/fixcrun
with:
checksums: CHECKSUMS
- name: Verify version of crun
run: crun --version|grep 1.14.4

unit: # make sure build/ci work properly
runs-on: ubuntu-latest
needs:
- fixcrun
steps:
- uses: actions/checkout@v3
- run: |
Expand Down Expand Up @@ -84,6 +98,8 @@ jobs:
usePodman: 'true'
runner: ubuntu-latest
runs-on: ${{ matrix.runner }}
needs:
- fixcrun
steps:
- uses: docker/setup-qemu-action@v2
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions CHECKSUMS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4f170aaa10d2ef02560cfb60b67ddfa1a83b1b4f7018227e9cb23a6af3955ec1 crun

0 comments on commit a7a01bf

Please sign in to comment.