Skip to content

Commit

Permalink
Merge pull request #25 from diddlesnaps/crun-workaround
Browse files Browse the repository at this point in the history
Workaround Ubuntu 22.04/crun failure in CI
  • Loading branch information
lucyllewy authored Mar 23, 2024
2 parents 13b50f0 + cc1fbbc commit c79a0fe
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
30 changes: 30 additions & 0 deletions .github/actions/fix-crun/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright (c) 2024 Markus Falb <markus.falb@mafalb.at>
# 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)"
curl -Lo crun "$URI"
sha256sum -c "$(basename $CHECKSUMS)"
sudo install crun /usr/bin/crun
...
12 changes: 10 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ jobs:
unit: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install crun
uses: ./.github/actions/fix-crun
with:
checksums: CHECKSUMS
- run: |
npm install
npm run all
Expand Down Expand Up @@ -86,7 +90,11 @@ jobs:
runs-on: ${{ matrix.runner }}
steps:
- uses: docker/setup-qemu-action@v2
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install crun
uses: ./.github/actions/fix-crun
with:
checksums: CHECKSUMS
- uses: ./
id: snapcraft
with:
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 c79a0fe

Please # to comment.