From 4dfb6845f4f2201b3f53720fad1fa351a9270388 Mon Sep 17 00:00:00 2001 From: Brett Holman Date: Thu, 10 Nov 2022 14:41:01 -0700 Subject: [PATCH] ci: run json tool on 22.04 rather than 20.04 (#1823) --- .github/workflows/check_format.yml | 5 +---- cloudinit/config/schemas/schema-cloud-config-v1.json | 7 +++++-- tools/check_json_format.sh | 9 ++++----- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/check_format.yml b/.github/workflows/check_format.yml index bf9c6f0b39a..4e7a7271c41 100644 --- a/.github/workflows/check_format.yml +++ b/.github/workflows/check_format.yml @@ -52,11 +52,8 @@ jobs: schema-format: strategy: fail-fast: false - matrix: - lint-with: - - {tip-versions: true, os: ubuntu-latest} name: Check json format - runs-on: ${{ matrix.lint-with.os }} + runs-on: ubuntu-22.04 steps: - name: "Checkout #1" uses: actions/checkout@v3.0.0 diff --git a/cloudinit/config/schemas/schema-cloud-config-v1.json b/cloudinit/config/schemas/schema-cloud-config-v1.json index 3cb0d84849a..d504f07a5bc 100644 --- a/cloudinit/config/schemas/schema-cloud-config-v1.json +++ b/cloudinit/config/schemas/schema-cloud-config-v1.json @@ -460,7 +460,7 @@ "run-user": { "type": "string", "description": "User to run module commands as. If install-method: pip, the pip install runs as this user as well." - }, + }, "ansible_config": { "description": "Sets the ANSIBLE_CONFIG environment variable. If set, overrides default config.", "type": "string" @@ -472,7 +472,10 @@ "repositories": { "type": "array", "items": { - "required": ["path", "source"], + "required": [ + "path", + "source" + ], "type": "object", "additionalProperties": false, "properties": { diff --git a/tools/check_json_format.sh b/tools/check_json_format.sh index ac73dc42bf7..62f7d6cd74e 100755 --- a/tools/check_json_format.sh +++ b/tools/check_json_format.sh @@ -5,8 +5,7 @@ # requires python 3.9 for --indent # file=$1 -before=$(cat "$file") -python3 -m json.tool --indent 2 "$file" "$file" -after=$(cat "$file") -test "$before" = "$after" -exit $? +before=$(cat "$file") && + python3 -m json.tool --indent 2 "$file" "$file" && + after=$(cat "$file") && + test "$before" = "$after"