From 7d51979c06bf7c214a88256735a7c87ca229a3a9 Mon Sep 17 00:00:00 2001 From: filipefurtad0 Date: Tue, 11 Apr 2023 15:35:43 +0100 Subject: [PATCH 1/2] Updates build environment to Ubuntu 22.04 Creates environment variable to set OS version --- .github/workflows/build.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2c16ec044a..1d6124f681 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,8 +17,10 @@ permissions: contents: read jobs: + env: + runs_on: ubuntu-22.04 knapsack_rspec_controllers: - runs-on: ubuntu-20.04 + runs-on: $runs_on services: postgres: image: postgres:10 @@ -87,7 +89,7 @@ jobs: bundle exec rake knapsack_pro:rspec knapsack_rspec_models: - runs-on: ubuntu-20.04 + runs-on: $runs_on services: postgres: image: postgres:10 @@ -156,7 +158,7 @@ jobs: bundle exec rake knapsack_pro:rspec knapsack_rspec_system_admin: - runs-on: ubuntu-20.04 + runs-on: $runs_on services: postgres: image: postgres:10 @@ -234,7 +236,7 @@ jobs: if-no-files-found: ignore knapsack_rspec_system_consumer: - runs-on: ubuntu-20.04 + runs-on: $runs_on services: postgres: image: postgres:10 @@ -312,7 +314,7 @@ jobs: if-no-files-found: ignore knapsack_rspec_engines: - runs-on: ubuntu-20.04 + runs-on: $runs_on services: postgres: image: postgres:10 @@ -390,7 +392,7 @@ jobs: if-no-files-found: ignore knapsack_rspec_test_the_rest: - runs-on: ubuntu-20.04 + runs-on: $runs_on services: postgres: image: postgres:10 @@ -460,7 +462,7 @@ jobs: bundle exec rake knapsack_pro:rspec non_knapsack_jest_karma: - runs-on: ubuntu-20.04 + runs-on: $runs_on services: postgres: image: postgres:10 From 135bc7e2f82f2e0946e0438cebcba4f18cd5258b Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Fri, 21 Apr 2023 11:56:30 +1000 Subject: [PATCH 2/2] Removing env variable $runs_on Seting "env" under "jobs" doesn't work it gets picked up as a job. I moved runs_on to the top level env. but I couldn't fine a way to get it to work. I tried all syntax I could think of: $runs_on, ${{ runs_on }} env.runs_on, ${{ env.runs_on }} and their capitalized versions. --- .github/workflows/build.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1d6124f681..6466a5c2a3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,10 +17,8 @@ permissions: contents: read jobs: - env: - runs_on: ubuntu-22.04 knapsack_rspec_controllers: - runs-on: $runs_on + runs-on: ubuntu-22.04 services: postgres: image: postgres:10 @@ -89,7 +87,7 @@ jobs: bundle exec rake knapsack_pro:rspec knapsack_rspec_models: - runs-on: $runs_on + runs-on: ubuntu-22.04 services: postgres: image: postgres:10 @@ -158,7 +156,7 @@ jobs: bundle exec rake knapsack_pro:rspec knapsack_rspec_system_admin: - runs-on: $runs_on + runs-on: ubuntu-22.04 services: postgres: image: postgres:10 @@ -236,7 +234,7 @@ jobs: if-no-files-found: ignore knapsack_rspec_system_consumer: - runs-on: $runs_on + runs-on: ubuntu-22.04 services: postgres: image: postgres:10 @@ -314,7 +312,7 @@ jobs: if-no-files-found: ignore knapsack_rspec_engines: - runs-on: $runs_on + runs-on: ubuntu-22.04 services: postgres: image: postgres:10 @@ -392,7 +390,7 @@ jobs: if-no-files-found: ignore knapsack_rspec_test_the_rest: - runs-on: $runs_on + runs-on: ubuntu-22.04 services: postgres: image: postgres:10 @@ -462,7 +460,7 @@ jobs: bundle exec rake knapsack_pro:rspec non_knapsack_jest_karma: - runs-on: $runs_on + runs-on: ubuntu-22.04 services: postgres: image: postgres:10