From b3a4ebbe06b300522973e4964df6eed07c38229f Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 2 Dec 2022 08:33:22 +0100 Subject: [PATCH] Only use ubuntu-20.04 if necessary. (#127) --- .github/workflows/ansible-test.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml index a359ce4c..0f7bcc2c 100644 --- a/.github/workflows/ansible-test.yml +++ b/.github/workflows/ansible-test.yml @@ -33,7 +33,15 @@ jobs: - stable-2.13 - stable-2.14 - devel - runs-on: ubuntu-20.04 + # Ansible-test on various stable branches does not yet work well with cgroups v2. + # Since ubuntu-latest now uses Ubuntu 22.04, we need to fall back to the ubuntu-20.04 + # image for these stable branches. The list of branches where this is necessary will + # shrink over time, check out https://github.com/ansible-collections/news-for-maintainers/issues/28 + # for the latest list. + runs-on: >- + ${{ contains(fromJson( + '["stable-2.9", "stable-2.10", "stable-2.11", "stable-2.12", "stable-2.13", "stable-2.14"]' + ), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }} steps: - name: Perform sanity testing uses: ansible-community/ansible-test-gh-action@release/v1 @@ -42,7 +50,15 @@ jobs: testing-type: sanity integration: - runs-on: ubuntu-20.04 + # Ansible-test on various stable branches does not yet work well with cgroups v2. + # Since ubuntu-latest now uses Ubuntu 22.04, we need to fall back to the ubuntu-20.04 + # image for these stable branches. The list of branches where this is necessary will + # shrink over time, check out https://github.com/ansible-collections/news-for-maintainers/issues/28 + # for the latest list. + runs-on: >- + ${{ contains(fromJson( + '["stable-2.9", "stable-2.10", "stable-2.11", "stable-2.12", "stable-2.13", "stable-2.14"]' + ), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }} strategy: matrix: ansible: