From 47fa84e6adb4de4f9809c169385b43aef2604bb4 Mon Sep 17 00:00:00 2001 From: carlj11 Date: Thu, 29 May 2025 13:51:22 -0400 Subject: [PATCH 1/5] Update sites-filter.js Update exhibit sort order to most recent exhibit appear first. --- asset/js/sites-filter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/js/sites-filter.js b/asset/js/sites-filter.js index 414168b6..8be4a3ee 100644 --- a/asset/js/sites-filter.js +++ b/asset/js/sites-filter.js @@ -97,7 +97,7 @@ function ActivateFilter() { }; function LoadItemSet( id ) { - let url = `/api/items?item_set_id=${id}`; + let url = `/api/items?item_set_id=${id}&sort_by=created&sort_order=desc`; document.getElementById("site-grid").innerHTML = ""; $.get( url, function( data ) { data.map(RenderSite); From 52c57e05aaf5af8e6bbb21f03f007be7518f1b0c Mon Sep 17 00:00:00 2001 From: Christopher Butler Date: Fri, 20 Jun 2025 16:19:28 -0400 Subject: [PATCH 2/5] Testing Solution for GHA Problems Why these changes are being introduced: The Omeka hosts are running Amazon Linux 2, which is build on CentOS 7 which is no longer on the GHA compatibility list. The shift to node20 (from node16) for all GHA runs requires newer versions of the glibc libraries that are not available for AL2. This means that our automated deployment workflows that use the Omeka hosts as our self-hosted GHA runners will now fail to run because of the glibc dependency. How this addresses that need: * This is an attempt to override the requirement for a newer version of glibc Side effects of this change: None. Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/IN-1327 --- .github/workflows/dev-manual.yml | 2 ++ .github/workflows/prod-deploy.yml | 2 +- .github/workflows/stage-deploy.yml | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dev-manual.yml b/.github/workflows/dev-manual.yml index 428512f8..ca7ae54f 100644 --- a/.github/workflows/dev-manual.yml +++ b/.github/workflows/dev-manual.yml @@ -6,6 +6,8 @@ jobs: deploy-theme: name: deploy-theme runs-on: [self-hosted, linux, stage] + env: + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true steps: - uses: actions/checkout@v3 - name: deploy-theme diff --git a/.github/workflows/prod-deploy.yml b/.github/workflows/prod-deploy.yml index 25c78352..c674a9de 100644 --- a/.github/workflows/prod-deploy.yml +++ b/.github/workflows/prod-deploy.yml @@ -5,6 +5,7 @@ on: jobs: deploy-theme: + if: github.ref == 'refs/heads/main' name: deploy-theme runs-on: [self-hosted, linux, prod] steps: @@ -12,7 +13,6 @@ jobs: uses: actions/checkout@v3 - name: deploy-theme - if: github.ref == 'refs/heads/main' run: | chown -R :client . chmod -R g+w . diff --git a/.github/workflows/stage-deploy.yml b/.github/workflows/stage-deploy.yml index 5df39325..90242157 100644 --- a/.github/workflows/stage-deploy.yml +++ b/.github/workflows/stage-deploy.yml @@ -14,6 +14,8 @@ jobs: deploy-theme: name: deploy-theme runs-on: [self-hosted, linux, stage] + env: + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true steps: - uses: actions/checkout@v3 - name: deploy-theme From 7d0adc2737d3e92daf027e5d44f9ae392ee920ae Mon Sep 17 00:00:00 2001 From: Christopher Butler Date: Fri, 20 Jun 2025 16:27:00 -0400 Subject: [PATCH 3/5] WIP: more testing This explicitly tries to force node16 --- .github/workflows/dev-manual.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/dev-manual.yml b/.github/workflows/dev-manual.yml index ca7ae54f..f1c3ab96 100644 --- a/.github/workflows/dev-manual.yml +++ b/.github/workflows/dev-manual.yml @@ -8,6 +8,8 @@ jobs: runs-on: [self-hosted, linux, stage] env: ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true + ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION: node16 + ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 steps: - uses: actions/checkout@v3 - name: deploy-theme From fe1b1dd61dd3a4f1bc6ff2c966fcd5eaebd43961 Mon Sep 17 00:00:00 2001 From: Christopher Butler Date: Mon, 23 Jun 2025 12:05:29 -0400 Subject: [PATCH 4/5] Replace actions/checkout Functionality Why these changes are being introduced: The hosts running the GitHub actions are running Amazon Linux 2 which is no longer on the supported host OS list for self-hosted GitHub runners. Since the actions-runner on the hosts is configured to auto-update, it not longer has node16 embedded and node20 cannot run on AL2 (because the host OS does not have an up-to-date-enough version of the glibc library). The only thing in the workflow that requires node20 is the actions/checkout command. So, instead of using actions/checkout, we just run the very short list of git commands that we need to checkout the correct commit to run the simple deploy command. We update the manual workflow, the staging workflow (for pushes to the main branch) and the production workflow (for tagged releases on the main branch). How this addresses that need: * Remove the actions/checkout@v3 step in all three workflows * Create new steps for the necessary git commands to clone the repo and checkout the correct commit Side effects of this change: None. Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/IN-1327 --- .github/workflows/dev-manual.yml | 14 +++++++++----- .github/workflows/prod-deploy.yml | 13 ++++++++++--- .github/workflows/stage-deploy.yml | 12 +++++++++--- 3 files changed, 28 insertions(+), 11 deletions(-) diff --git a/.github/workflows/dev-manual.yml b/.github/workflows/dev-manual.yml index f1c3ab96..762d063e 100644 --- a/.github/workflows/dev-manual.yml +++ b/.github/workflows/dev-manual.yml @@ -6,12 +6,16 @@ jobs: deploy-theme: name: deploy-theme runs-on: [self-hosted, linux, stage] - env: - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true - ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION: node16 - ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 steps: - - uses: actions/checkout@v3 + - name: setup-git + run: | + git config --global user.name "github-actions" + git config --global user.email "github-actions@github.com" + - name: clone-repo + run: | + git clone https://github.com/${{ github.repository }} repo + cd repo + git checkout ${{ github.sha }} - name: deploy-theme run: | chown -R :client . diff --git a/.github/workflows/prod-deploy.yml b/.github/workflows/prod-deploy.yml index c674a9de..7efec8f2 100644 --- a/.github/workflows/prod-deploy.yml +++ b/.github/workflows/prod-deploy.yml @@ -9,9 +9,16 @@ jobs: name: deploy-theme runs-on: [self-hosted, linux, prod] steps: - - name: checkout code - uses: actions/checkout@v3 - + - name: setup-git + run: | + git config --global user.name "github-actions" + git config --global user.email "github-actions@github.com" + - name: clone-repo + run: | + git clone https://github.com/${{ github.repository }} repo + cd repo + git fetch --tags + git checkout tags/${{ github.event.release.tag_name }} - name: deploy-theme run: | chown -R :client . diff --git a/.github/workflows/stage-deploy.yml b/.github/workflows/stage-deploy.yml index 90242157..694c09da 100644 --- a/.github/workflows/stage-deploy.yml +++ b/.github/workflows/stage-deploy.yml @@ -14,10 +14,16 @@ jobs: deploy-theme: name: deploy-theme runs-on: [self-hosted, linux, stage] - env: - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true steps: - - uses: actions/checkout@v3 + - name: setup-git + run: | + git config --global user.name "github-actions" + git config --global user.email "github-actions@github.com" + - name: clone-repo + run: | + git clone https://github.com/${{ github.repository }} repo + cd repo + git checkout ${{ github.ref_name }} - name: deploy-theme run: | chown -R :client . From ba0fa177bde39d8801a4f2e9561dba8d03104d5c Mon Sep 17 00:00:00 2001 From: carlj11 Date: Thu, 29 May 2025 13:51:22 -0400 Subject: [PATCH 5/5] Update sites-filter.js Update exhibit sort order to most recent exhibit appear first. --- asset/js/sites-filter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/js/sites-filter.js b/asset/js/sites-filter.js index 414168b6..8be4a3ee 100644 --- a/asset/js/sites-filter.js +++ b/asset/js/sites-filter.js @@ -97,7 +97,7 @@ function ActivateFilter() { }; function LoadItemSet( id ) { - let url = `/api/items?item_set_id=${id}`; + let url = `/api/items?item_set_id=${id}&sort_by=created&sort_order=desc`; document.getElementById("site-grid").innerHTML = ""; $.get( url, function( data ) { data.map(RenderSite);