From 26ebe619e380a4ae52d1d362cb0453c02724914b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Mon, 14 Oct 2024 13:47:28 +0200 Subject: [PATCH 1/2] Use a specific version of Ubuntu in workflows Using ubuntu-latest might result in incompatibilities when this image changes to a different version of Ubuntu. For example, the Ubuntu 24.04 image no longer includes imagemagick, meaning that we'll have to install it manually when using Ubuntu 24.04. --- .github/workflows/auto-author-assign.yml | 2 +- .github/workflows/db_schema.yml | 2 +- .github/workflows/docker.yml | 2 +- .github/workflows/linters.yml | 2 +- .github/workflows/pronto.yml | 2 +- .github/workflows/tests.yml | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/auto-author-assign.yml b/.github/workflows/auto-author-assign.yml index 66b61b953..82c5fe3e7 100644 --- a/.github/workflows/auto-author-assign.yml +++ b/.github/workflows/auto-author-assign.yml @@ -11,6 +11,6 @@ jobs: assign-author: name: Auto-assign pull request author if: github.repository_owner == 'consuldemocracy' - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: toshimaru/auto-author-assign@v2.1.1 diff --git a/.github/workflows/db_schema.yml b/.github/workflows/db_schema.yml index 8a257bf26..2860df2c9 100644 --- a/.github/workflows/db_schema.yml +++ b/.github/workflows/db_schema.yml @@ -12,7 +12,7 @@ permissions: jobs: schema: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 services: postgres: image: postgres:13.16 diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index a87c9c3f6..1d38f1390 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -6,7 +6,7 @@ permissions: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 5f24aaf3d..2765fd0f1 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -6,7 +6,7 @@ permissions: jobs: linters: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/pronto.yml b/.github/workflows/pronto.yml index 76d851cdc..227521e22 100644 --- a/.github/workflows/pronto.yml +++ b/.github/workflows/pronto.yml @@ -3,7 +3,7 @@ on: [pull_request] jobs: pronto: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 if: github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name && github.actor != 'dependabot[bot]' steps: - name: Checkout code diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5c7319266..87e2c14ad 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,7 @@ env: jobs: tests: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 timeout-minutes: 60 services: postgres: @@ -76,7 +76,7 @@ jobs: coveralls: permissions: contents: none - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: tests steps: - name: Finish coveralls From 13481fdf329af0917820d8513f8d7c34b2af6e09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Mon, 14 Oct 2024 13:50:31 +0200 Subject: [PATCH 2/2] Use Ubuntu 24.04 in our workflows This is what github actions currently uses when using ubuntu-latest, and what we recommend for new Consul Democracy installations. --- .github/workflows/auto-author-assign.yml | 2 +- .github/workflows/db_schema.yml | 2 +- .github/workflows/docker.yml | 2 +- .github/workflows/linters.yml | 2 +- .github/workflows/pronto.yml | 2 +- .github/workflows/tests.yml | 6 ++++-- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/auto-author-assign.yml b/.github/workflows/auto-author-assign.yml index 82c5fe3e7..1f17edaa9 100644 --- a/.github/workflows/auto-author-assign.yml +++ b/.github/workflows/auto-author-assign.yml @@ -11,6 +11,6 @@ jobs: assign-author: name: Auto-assign pull request author if: github.repository_owner == 'consuldemocracy' - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: toshimaru/auto-author-assign@v2.1.1 diff --git a/.github/workflows/db_schema.yml b/.github/workflows/db_schema.yml index 2860df2c9..57ef83a2e 100644 --- a/.github/workflows/db_schema.yml +++ b/.github/workflows/db_schema.yml @@ -12,7 +12,7 @@ permissions: jobs: schema: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 services: postgres: image: postgres:13.16 diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1d38f1390..ec21905be 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -6,7 +6,7 @@ permissions: jobs: build: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 2765fd0f1..abac358ae 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -6,7 +6,7 @@ permissions: jobs: linters: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/pronto.yml b/.github/workflows/pronto.yml index 227521e22..fb403ffe2 100644 --- a/.github/workflows/pronto.yml +++ b/.github/workflows/pronto.yml @@ -3,7 +3,7 @@ on: [pull_request] jobs: pronto: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 if: github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name && github.actor != 'dependabot[bot]' steps: - name: Checkout code diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 87e2c14ad..a4fd66f74 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,7 @@ env: jobs: tests: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 timeout-minutes: 60 services: postgres: @@ -46,6 +46,8 @@ jobs: node-version-file: ".node-version" - name: Install node packages run: npm clean-install + - name: Install ImageMagick + run: sudo apt-get install imagemagick - name: Copy secrets and database files run: for i in config/*.example; do cp "$i" "${i/.example}"; done - name: Setup database @@ -76,7 +78,7 @@ jobs: coveralls: permissions: contents: none - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 needs: tests steps: - name: Finish coveralls