From 3b373eb052b2edfe6d48a6b54915b1e4bc7d6994 Mon Sep 17 00:00:00 2001 From: Florian Wilhelm <2292245+fwilhe@users.noreply.github.com> Date: Thu, 14 Mar 2024 16:12:25 +0100 Subject: [PATCH] Apply crun workaround for github actions (#25) --- .github/workflows/image.yml | 48 +++++++++++++++++++++++++++++++++++ .github/workflows/repo.yml | 48 +++++++++++++++++++++++++++++++++++ .github/workflows/sysexts.yml | 24 ++++++++++++++++++ 3 files changed, 120 insertions(+) diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index 914bcd8..d199168 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -12,6 +12,30 @@ jobs: arch: [ amd64, arm64 ] steps: - uses: actions/checkout@v4 + # Workaround for https://github.com/actions/runner-images/issues/9425, to be removed once the issue is resolved + - name: patch crun (Workaround for https://github.com/actions/runner-images/issues/9425) + run: | + tmpdir="$(mktemp -d)" + pushd "$tmpdir" + curl -Lo ./crun https://github.com/containers/crun/releases/download/1.14.3/crun-1.14.3-linux-amd64 + GOOD_SHA=80c5ab9422d4672f650f2bad3da933568349b64117d055486abc3534517be2af + + sha256sum ./crun + OUR_SHA=$(sha256sum ./crun | awk '{ print $1 }') + + if [[ "$GOOD_SHA" == "$OUR_SHA" ]]; then + sudo install crun /usr/bin/crun + else + echo "Checksums do not match" + exit 1 + fi + popd + rm -rf "$tmpdir" + shell: bash + - name: Show crun version after the patch + shell: bash + run: | + crun --version - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Build the image @@ -36,6 +60,30 @@ jobs: platform: [ kvm, metal ] steps: - uses: actions/checkout@v4 + # Workaround for https://github.com/actions/runner-images/issues/9425, to be removed once the issue is resolved + - name: patch crun (Workaround for https://github.com/actions/runner-images/issues/9425) + run: | + tmpdir="$(mktemp -d)" + pushd "$tmpdir" + curl -Lo ./crun https://github.com/containers/crun/releases/download/1.14.3/crun-1.14.3-linux-amd64 + GOOD_SHA=80c5ab9422d4672f650f2bad3da933568349b64117d055486abc3534517be2af + + sha256sum ./crun + OUR_SHA=$(sha256sum ./crun | awk '{ print $1 }') + + if [[ "$GOOD_SHA" == "$OUR_SHA" ]]; then + sudo install crun /usr/bin/crun + else + echo "Checksums do not match" + exit 1 + fi + popd + rm -rf "$tmpdir" + shell: bash + - name: Show crun version after the patch + shell: bash + run: | + crun --version - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Configure Build Variant diff --git a/.github/workflows/repo.yml b/.github/workflows/repo.yml index c99557b..2780105 100644 --- a/.github/workflows/repo.yml +++ b/.github/workflows/repo.yml @@ -16,6 +16,30 @@ jobs: arch: [ amd64, arm64 ] steps: - uses: actions/checkout@v4 + # Workaround for https://github.com/actions/runner-images/issues/9425, to be removed once the issue is resolved + - name: patch crun (Workaround for https://github.com/actions/runner-images/issues/9425) + run: | + tmpdir="$(mktemp -d)" + pushd "$tmpdir" + curl -Lo ./crun https://github.com/containers/crun/releases/download/1.14.3/crun-1.14.3-linux-amd64 + GOOD_SHA=80c5ab9422d4672f650f2bad3da933568349b64117d055486abc3534517be2af + + sha256sum ./crun + OUR_SHA=$(sha256sum ./crun | awk '{ print $1 }') + + if [[ "$GOOD_SHA" == "$OUR_SHA" ]]; then + sudo install crun /usr/bin/crun + else + echo "Checksums do not match" + exit 1 + fi + popd + rm -rf "$tmpdir" + shell: bash + - name: Show crun version after the patch + shell: bash + run: | + crun --version - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Build the repo @@ -40,6 +64,30 @@ jobs: platform: [ kvm, metal ] steps: - uses: actions/checkout@v4 + # Workaround for https://github.com/actions/runner-images/issues/9425, to be removed once the issue is resolved + - name: patch crun (Workaround for https://github.com/actions/runner-images/issues/9425) + run: | + tmpdir="$(mktemp -d)" + pushd "$tmpdir" + curl -Lo ./crun https://github.com/containers/crun/releases/download/1.14.3/crun-1.14.3-linux-amd64 + GOOD_SHA=80c5ab9422d4672f650f2bad3da933568349b64117d055486abc3534517be2af + + sha256sum ./crun + OUR_SHA=$(sha256sum ./crun | awk '{ print $1 }') + + if [[ "$GOOD_SHA" == "$OUR_SHA" ]]; then + sudo install crun /usr/bin/crun + else + echo "Checksums do not match" + exit 1 + fi + popd + rm -rf "$tmpdir" + shell: bash + - name: Show crun version after the patch + shell: bash + run: | + crun --version - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Configure Build Variant diff --git a/.github/workflows/sysexts.yml b/.github/workflows/sysexts.yml index ea54459..e890d78 100644 --- a/.github/workflows/sysexts.yml +++ b/.github/workflows/sysexts.yml @@ -12,6 +12,30 @@ jobs: arch: [ x86-64, arm64 ] steps: - uses: actions/checkout@v4 + # Workaround for https://github.com/actions/runner-images/issues/9425, to be removed once the issue is resolved + - name: patch crun (Workaround for https://github.com/actions/runner-images/issues/9425) + run: | + tmpdir="$(mktemp -d)" + pushd "$tmpdir" + curl -Lo ./crun https://github.com/containers/crun/releases/download/1.14.3/crun-1.14.3-linux-amd64 + GOOD_SHA=80c5ab9422d4672f650f2bad3da933568349b64117d055486abc3534517be2af + + sha256sum ./crun + OUR_SHA=$(sha256sum ./crun | awk '{ print $1 }') + + if [[ "$GOOD_SHA" == "$OUR_SHA" ]]; then + sudo install crun /usr/bin/crun + else + echo "Checksums do not match" + exit 1 + fi + popd + rm -rf "$tmpdir" + shell: bash + - name: Show crun version after the patch + shell: bash + run: | + crun --version - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Setup mkosi