From 93acd07fa1045c3e0b1db9e43047b4879631ec79 Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 01:02:01 +0200 Subject: [PATCH 01/32] add initial version of workflow for platformos-check --- .github/workflows/check-liquid.yaml | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/check-liquid.yaml diff --git a/.github/workflows/check-liquid.yaml b/.github/workflows/check-liquid.yaml new file mode 100644 index 0000000..f1816de --- /dev/null +++ b/.github/workflows/check-liquid.yaml @@ -0,0 +1,36 @@ +name: Run Liquid Check +on: + push: + branches: + - '*' + paths-ignore: + - '**/README.md' + +jobs: + check_liquid: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up logs directory + run: mkdir -p logs + + - name: Start PlatformOS LSP + run: | + docker run -i \ + -v ${{ github.workspace }}:${{ github.workspace }} \ + -w ${{ github.workspace }} \ + -e PLATFORMOS_CHECK_DEBUG=true \ + -e PLATFORMOS_CHECK_DEBUG_LOG_FILE=${{ github.workspace }}/logs/platformos-lsp.log \ + platformos/platformos-lsp:latest + + - name: Run platformos-check + run: | + docker run -i \ + -v ${{ github.workspace }}:${{ github.workspace }} \ + -w ${{ github.workspace }} \ + -e PLATFORMOS_CHECK_DEBUG=true \ + -e PLATFORMOS_CHECK_DEBUG_LOG_FILE=${{ github.workspace }}/logs/platformos-check.log \ + platformos/platformos-check:latest + platformos-check liquid From d2b1b07823127fade0b56413dd92fe9d39aa09c9 Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 01:12:33 +0200 Subject: [PATCH 02/32] set more open permissions for the logs directory, otherwise other steps can operate in it --- .github/workflows/check-liquid.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-liquid.yaml b/.github/workflows/check-liquid.yaml index f1816de..73c3740 100644 --- a/.github/workflows/check-liquid.yaml +++ b/.github/workflows/check-liquid.yaml @@ -14,7 +14,9 @@ jobs: uses: actions/checkout@v4 - name: Set up logs directory - run: mkdir -p logs + run: | + mkdir -p logs + chmod -R 777 logs - name: Start PlatformOS LSP run: | From 2decf4495d8aee9dcad6a14b57eea4de18eae34e Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 01:15:08 +0200 Subject: [PATCH 03/32] remove unneeded command --- .github/workflows/check-liquid.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/check-liquid.yaml b/.github/workflows/check-liquid.yaml index 73c3740..3e7f860 100644 --- a/.github/workflows/check-liquid.yaml +++ b/.github/workflows/check-liquid.yaml @@ -35,4 +35,3 @@ jobs: -e PLATFORMOS_CHECK_DEBUG=true \ -e PLATFORMOS_CHECK_DEBUG_LOG_FILE=${{ github.workspace }}/logs/platformos-check.log \ platformos/platformos-check:latest - platformos-check liquid From 5c0b9820d47edecfd5709262da08d30d60ec80da Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 01:19:15 +0200 Subject: [PATCH 04/32] intentionally break one of the files to test pos-check in the ci pipeline --- modules/core/public/lib/validations/email.liquid | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/core/public/lib/validations/email.liquid b/modules/core/public/lib/validations/email.liquid index d8a1188..a333026 100644 --- a/modules/core/public/lib/validations/email.liquid +++ b/modules/core/public/lib/validations/email.liquid @@ -6,6 +6,7 @@ {% endcomment %} {% liquid +agnisn assign valid_email = object[field_name] | is_email_valid unless valid_email assign key = key | default: "modules/core/validation.email" From 3dbc76bdd0d708666a824c2cc335d5f8bb945b40 Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 16:36:20 +0200 Subject: [PATCH 05/32] add summary to the workflow - wip --- .github/workflows/check-liquid.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-liquid.yaml b/.github/workflows/check-liquid.yaml index 3e7f860..9fb7192 100644 --- a/.github/workflows/check-liquid.yaml +++ b/.github/workflows/check-liquid.yaml @@ -19,6 +19,7 @@ jobs: chmod -R 777 logs - name: Start PlatformOS LSP + id: start-lsp run: | docker run -i \ -v ${{ github.workspace }}:${{ github.workspace }} \ @@ -28,10 +29,16 @@ jobs: platformos/platformos-lsp:latest - name: Run platformos-check + id: run-check run: | docker run -i \ -v ${{ github.workspace }}:${{ github.workspace }} \ -w ${{ github.workspace }} \ -e PLATFORMOS_CHECK_DEBUG=true \ -e PLATFORMOS_CHECK_DEBUG_LOG_FILE=${{ github.workspace }}/logs/platformos-check.log \ - platformos/platformos-check:latest + platformos/platformos-check:latest >> "$GITHUB_OUTPUT" + + - name: Summary of platformos-check + run: | + echo "platformos-check summary:" >> "$GITHUB_SUMMARY" + echo "Result: ${{ steps.run-check.outputs.result }}" >> "$GITHUB_SUMMARY" From 2400ee9aaa205dc54cb7b8266b2981f276db7afc Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 16:38:08 +0200 Subject: [PATCH 06/32] intentionally introduce another type or error check the output of platformos-check --- modules/core/public/lib/validations/email.liquid | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/core/public/lib/validations/email.liquid b/modules/core/public/lib/validations/email.liquid index a333026..c5bf22b 100644 --- a/modules/core/public/lib/validations/email.liquid +++ b/modules/core/public/lib/validations/email.liquid @@ -6,10 +6,9 @@ {% endcomment %} {% liquid -agnisn assign valid_email = object[field_name] | is_email_valid unless valid_email - assign key = key | default: "modules/core/validation.email" + assign key = key | default: "modules/core/validation.email function c = 'modules/core/helpers/register_error', contract: c, field_name: field_name, key: key endunless return c From 0bcd01f2c51accbc817e6d64a72c61280430dcb6 Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 16:43:50 +0200 Subject: [PATCH 07/32] add run conditions for start-lsp and run-check steps --- .github/workflows/check-liquid.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/check-liquid.yaml b/.github/workflows/check-liquid.yaml index 9fb7192..2145ffb 100644 --- a/.github/workflows/check-liquid.yaml +++ b/.github/workflows/check-liquid.yaml @@ -29,6 +29,7 @@ jobs: platformos/platformos-lsp:latest - name: Run platformos-check + if: ${{ steps.start-lsp.outcome == 'success' }} id: run-check run: | docker run -i \ @@ -39,6 +40,7 @@ jobs: platformos/platformos-check:latest >> "$GITHUB_OUTPUT" - name: Summary of platformos-check + if: ${{ steps.run-check.outcome == 'success' || steps.run-check.outcome == 'failure' }} run: | echo "platformos-check summary:" >> "$GITHUB_SUMMARY" echo "Result: ${{ steps.run-check.outputs.result }}" >> "$GITHUB_SUMMARY" From a0205f9735880f30f1060cdfaafd3c6012152819 Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 16:52:37 +0200 Subject: [PATCH 08/32] fix the way output from platformos-check is written to GITHUB_OUTPUT --- .github/workflows/check-liquid.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-liquid.yaml b/.github/workflows/check-liquid.yaml index 2145ffb..958b3a9 100644 --- a/.github/workflows/check-liquid.yaml +++ b/.github/workflows/check-liquid.yaml @@ -32,12 +32,14 @@ jobs: if: ${{ steps.start-lsp.outcome == 'success' }} id: run-check run: | - docker run -i \ + pos-check-output=$(docker run -i \ -v ${{ github.workspace }}:${{ github.workspace }} \ -w ${{ github.workspace }} \ -e PLATFORMOS_CHECK_DEBUG=true \ -e PLATFORMOS_CHECK_DEBUG_LOG_FILE=${{ github.workspace }}/logs/platformos-check.log \ - platformos/platformos-check:latest >> "$GITHUB_OUTPUT" + platformos/platformos-check:latest) + + echo "pos-check-output" >> "$GITHUB_OUTPUT" - name: Summary of platformos-check if: ${{ steps.run-check.outcome == 'success' || steps.run-check.outcome == 'failure' }} From 2d84bda4cdb09396bbac2bfe258b0fa2e6b5fce0 Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 17:07:00 +0200 Subject: [PATCH 09/32] fix a few issues within the workflow fix notation in step-ids: only underscore works in dot notation remove attempt to store output of platformos-check in GH's output file simplify summary --- .github/workflows/check-liquid.yaml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/check-liquid.yaml b/.github/workflows/check-liquid.yaml index 958b3a9..c6f2181 100644 --- a/.github/workflows/check-liquid.yaml +++ b/.github/workflows/check-liquid.yaml @@ -19,7 +19,7 @@ jobs: chmod -R 777 logs - name: Start PlatformOS LSP - id: start-lsp + id: start_lsp run: | docker run -i \ -v ${{ github.workspace }}:${{ github.workspace }} \ @@ -29,20 +29,18 @@ jobs: platformos/platformos-lsp:latest - name: Run platformos-check - if: ${{ steps.start-lsp.outcome == 'success' }} - id: run-check + id: run_check + if: ${{ steps.start_lsp.outcome == 'success' }} run: | - pos-check-output=$(docker run -i \ + docker run -i \ -v ${{ github.workspace }}:${{ github.workspace }} \ -w ${{ github.workspace }} \ -e PLATFORMOS_CHECK_DEBUG=true \ -e PLATFORMOS_CHECK_DEBUG_LOG_FILE=${{ github.workspace }}/logs/platformos-check.log \ - platformos/platformos-check:latest) - - echo "pos-check-output" >> "$GITHUB_OUTPUT" + platformos/platformos-check:latest - name: Summary of platformos-check - if: ${{ steps.run-check.outcome == 'success' || steps.run-check.outcome == 'failure' }} + if: ${{ steps.run_check.outcome == 'success' || steps.run_check.outcome == 'failure' }} run: | echo "platformos-check summary:" >> "$GITHUB_SUMMARY" - echo "Result: ${{ steps.run-check.outputs.result }}" >> "$GITHUB_SUMMARY" + echo "Result: ${{ steps.run_check.outcome }}" >> "$GITHUB_SUMMARY" From 15c21da5480f31704c0f707cd7e8d5c3c9b1a4d8 Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 17:14:08 +0200 Subject: [PATCH 10/32] use continue-on-error in run_check step this is supposed to preserve GH's built-in step outcome handling --- .github/workflows/check-liquid.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check-liquid.yaml b/.github/workflows/check-liquid.yaml index c6f2181..3466a14 100644 --- a/.github/workflows/check-liquid.yaml +++ b/.github/workflows/check-liquid.yaml @@ -31,6 +31,7 @@ jobs: - name: Run platformos-check id: run_check if: ${{ steps.start_lsp.outcome == 'success' }} + continue-on-error: true run: | docker run -i \ -v ${{ github.workspace }}:${{ github.workspace }} \ From 124247ffd216005a5373ed67ec4905b1ba7329a8 Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 17:18:41 +0200 Subject: [PATCH 11/32] remove problematic double-quotes around GITHUB_SUMMARY --- .github/workflows/check-liquid.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-liquid.yaml b/.github/workflows/check-liquid.yaml index 3466a14..e583004 100644 --- a/.github/workflows/check-liquid.yaml +++ b/.github/workflows/check-liquid.yaml @@ -43,5 +43,5 @@ jobs: - name: Summary of platformos-check if: ${{ steps.run_check.outcome == 'success' || steps.run_check.outcome == 'failure' }} run: | - echo "platformos-check summary:" >> "$GITHUB_SUMMARY" - echo "Result: ${{ steps.run_check.outcome }}" >> "$GITHUB_SUMMARY" + echo "platformos-check summary:" >> $GITHUB_SUMMARY + echo "Result: ${{ steps.run_check.outcome }}" >> $GITHUB_SUMMARY From b744b0d498a011aa7041ee3ed04a7ad604cd4d71 Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 18:12:04 +0200 Subject: [PATCH 12/32] add step to upload an artifact --- .github/workflows/check-liquid.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-liquid.yaml b/.github/workflows/check-liquid.yaml index e583004..e6b374f 100644 --- a/.github/workflows/check-liquid.yaml +++ b/.github/workflows/check-liquid.yaml @@ -38,7 +38,16 @@ jobs: -w ${{ github.workspace }} \ -e PLATFORMOS_CHECK_DEBUG=true \ -e PLATFORMOS_CHECK_DEBUG_LOG_FILE=${{ github.workspace }}/logs/platformos-check.log \ - platformos/platformos-check:latest + platformos/platformos-check:latest | tee logs/platformos-check.log + + - name: Upload logs + if: ${{ steps.run_check.outcome == 'success' || steps.run_check.outcome == 'failure' }} + uses: actions/upload-artifact@v4 + with: + name: platformos_check_logs_${{ github.run_id }} + path: | + logs/platformos-lsp.log + logs/platformos-check.log - name: Summary of platformos-check if: ${{ steps.run_check.outcome == 'success' || steps.run_check.outcome == 'failure' }} From 28c73aa0d2eae4813939ff9dd6fc4008b632ea57 Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 18:27:39 +0200 Subject: [PATCH 13/32] redirect the check's output to json file; work on summary --- .github/workflows/check-liquid.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-liquid.yaml b/.github/workflows/check-liquid.yaml index e6b374f..51bd709 100644 --- a/.github/workflows/check-liquid.yaml +++ b/.github/workflows/check-liquid.yaml @@ -38,7 +38,7 @@ jobs: -w ${{ github.workspace }} \ -e PLATFORMOS_CHECK_DEBUG=true \ -e PLATFORMOS_CHECK_DEBUG_LOG_FILE=${{ github.workspace }}/logs/platformos-check.log \ - platformos/platformos-check:latest | tee logs/platformos-check.log + platformos/platformos-check:latest -o json | tee >(jq . > logs/platformos-check.json) - name: Upload logs if: ${{ steps.run_check.outcome == 'success' || steps.run_check.outcome == 'failure' }} @@ -47,10 +47,10 @@ jobs: name: platformos_check_logs_${{ github.run_id }} path: | logs/platformos-lsp.log - logs/platformos-check.log + logs/platformos-check.json - name: Summary of platformos-check if: ${{ steps.run_check.outcome == 'success' || steps.run_check.outcome == 'failure' }} run: | - echo "platformos-check summary:" >> $GITHUB_SUMMARY - echo "Result: ${{ steps.run_check.outcome }}" >> $GITHUB_SUMMARY + echo "### Summary for platformos-check:" >> $GITHUB_STEP_SUMMARY + echo "## Result: ${{ steps.run_check.outcome }}" >> $GITHUB_STEP_SUMMARY From c882d87d767ec7b7781fd43fd03b8d4fb4d8e2ce Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 18:55:34 +0200 Subject: [PATCH 14/32] prettify output of pos-check prettify the output and then redirect it, prettified, to a file --- .github/workflows/check-liquid.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-liquid.yaml b/.github/workflows/check-liquid.yaml index 51bd709..71e6711 100644 --- a/.github/workflows/check-liquid.yaml +++ b/.github/workflows/check-liquid.yaml @@ -38,7 +38,7 @@ jobs: -w ${{ github.workspace }} \ -e PLATFORMOS_CHECK_DEBUG=true \ -e PLATFORMOS_CHECK_DEBUG_LOG_FILE=${{ github.workspace }}/logs/platformos-check.log \ - platformos/platformos-check:latest -o json | tee >(jq . > logs/platformos-check.json) + platformos/platformos-check:latest -o json | jq . | tee logs/platformos-check.json - name: Upload logs if: ${{ steps.run_check.outcome == 'success' || steps.run_check.outcome == 'failure' }} @@ -52,5 +52,5 @@ jobs: - name: Summary of platformos-check if: ${{ steps.run_check.outcome == 'success' || steps.run_check.outcome == 'failure' }} run: | - echo "### Summary for platformos-check:" >> $GITHUB_STEP_SUMMARY + echo "# Summary for platformos-check:" >> $GITHUB_STEP_SUMMARY echo "## Result: ${{ steps.run_check.outcome }}" >> $GITHUB_STEP_SUMMARY From 9e9b480965f71becdeb187862e8787a8044bcdfc Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 19:59:40 +0200 Subject: [PATCH 15/32] make the shell return a failure if any command in the pipeline fails in the run_check step --- .github/workflows/check-liquid.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check-liquid.yaml b/.github/workflows/check-liquid.yaml index 71e6711..829d9bd 100644 --- a/.github/workflows/check-liquid.yaml +++ b/.github/workflows/check-liquid.yaml @@ -33,6 +33,7 @@ jobs: if: ${{ steps.start_lsp.outcome == 'success' }} continue-on-error: true run: | + set -o pipefail docker run -i \ -v ${{ github.workspace }}:${{ github.workspace }} \ -w ${{ github.workspace }} \ From bbbb5eb31bc7adca5623d8b29bcbb3585509b738 Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 20:15:04 +0200 Subject: [PATCH 16/32] add some gh emojis to improve result visibility --- .github/workflows/check-liquid.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-liquid.yaml b/.github/workflows/check-liquid.yaml index 829d9bd..df60a3e 100644 --- a/.github/workflows/check-liquid.yaml +++ b/.github/workflows/check-liquid.yaml @@ -53,5 +53,7 @@ jobs: - name: Summary of platformos-check if: ${{ steps.run_check.outcome == 'success' || steps.run_check.outcome == 'failure' }} run: | - echo "# Summary for platformos-check:" >> $GITHUB_STEP_SUMMARY - echo "## Result: ${{ steps.run_check.outcome }}" >> $GITHUB_STEP_SUMMARY + echo "# Summary :checkered_flag:" >> $GITHUB_STEP_SUMMARY + echo "## Result: ${{ steps.run_check.outcome }} ${{ env.result-icon }}" >> $GITHUB_STEP_SUMMARY + env: + result-icon: ${{ steps.run_check.outcome == 'success' && ':white_check_mark:' || ':x:' }} From c1a81e070a3ca896daf663fd3dc7ffeef5784833 Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 20:31:48 +0200 Subject: [PATCH 17/32] add a step to fail the job if platformos-check is a failure --- .github/workflows/check-liquid.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/check-liquid.yaml b/.github/workflows/check-liquid.yaml index df60a3e..c263bd6 100644 --- a/.github/workflows/check-liquid.yaml +++ b/.github/workflows/check-liquid.yaml @@ -57,3 +57,9 @@ jobs: echo "## Result: ${{ steps.run_check.outcome }} ${{ env.result-icon }}" >> $GITHUB_STEP_SUMMARY env: result-icon: ${{ steps.run_check.outcome == 'success' && ':white_check_mark:' || ':x:' }} + + - name: Fail job if platformos-check failed + if: ${{ steps.run_check.outcome == 'failure' }} + run: | + echo "platformos-check failed — marking job as failed" + exit 1 From 605b98795cc5652dbc66d293cb81a5c22d1dd447 Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 20:34:04 +0200 Subject: [PATCH 18/32] fix the intentionally introduced error --- modules/core/public/lib/validations/email.liquid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/public/lib/validations/email.liquid b/modules/core/public/lib/validations/email.liquid index c5bf22b..d8a1188 100644 --- a/modules/core/public/lib/validations/email.liquid +++ b/modules/core/public/lib/validations/email.liquid @@ -8,7 +8,7 @@ {% liquid assign valid_email = object[field_name] | is_email_valid unless valid_email - assign key = key | default: "modules/core/validation.email + assign key = key | default: "modules/core/validation.email" function c = 'modules/core/helpers/register_error', contract: c, field_name: field_name, key: key endunless return c From 2965ce150c85bbbe927b38cd2336cf1a62977dae Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 20:39:29 +0200 Subject: [PATCH 19/32] couple of changes: - rename the workflow - set triggers for all branches and all PRs, ignore changes to any README.md --- .github/workflows/check-liquid.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check-liquid.yaml b/.github/workflows/check-liquid.yaml index c263bd6..4d3363e 100644 --- a/.github/workflows/check-liquid.yaml +++ b/.github/workflows/check-liquid.yaml @@ -1,8 +1,9 @@ -name: Run Liquid Check +name: Run platformos-check on Liquid files on: push: - branches: - - '*' + paths-ignore: + - '**/README.md' + pull_request: paths-ignore: - '**/README.md' From fc297ddef8988f84bbacd2ee77f8469b9735ea8e Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 20:42:45 +0200 Subject: [PATCH 20/32] intentionally break one of the files to test artifact upload --- modules/core/public/lib/validations/email.liquid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/public/lib/validations/email.liquid b/modules/core/public/lib/validations/email.liquid index d8a1188..c5bf22b 100644 --- a/modules/core/public/lib/validations/email.liquid +++ b/modules/core/public/lib/validations/email.liquid @@ -8,7 +8,7 @@ {% liquid assign valid_email = object[field_name] | is_email_valid unless valid_email - assign key = key | default: "modules/core/validation.email" + assign key = key | default: "modules/core/validation.email function c = 'modules/core/helpers/register_error', contract: c, field_name: field_name, key: key endunless return c From 64492c862d30b55e61953470e0cd02d6194c77b4 Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 20:44:47 +0200 Subject: [PATCH 21/32] fix the intentionally-broken file --- modules/core/public/lib/validations/email.liquid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/public/lib/validations/email.liquid b/modules/core/public/lib/validations/email.liquid index c5bf22b..d8a1188 100644 --- a/modules/core/public/lib/validations/email.liquid +++ b/modules/core/public/lib/validations/email.liquid @@ -8,7 +8,7 @@ {% liquid assign valid_email = object[field_name] | is_email_valid unless valid_email - assign key = key | default: "modules/core/validation.email + assign key = key | default: "modules/core/validation.email" function c = 'modules/core/helpers/register_error', contract: c, field_name: field_name, key: key endunless return c From ae63b033dc7fec619ac2a91a1defe0495540e1e3 Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 21:55:52 +0200 Subject: [PATCH 22/32] use a composite workflow to run platformos-check The main workflow has been moved to Platform-OS/gh-workflows repo, and it's called from there --- .github/workflows/check-liquid.yaml | 66 --------------------- .github/workflows/run-platformos-check.yaml | 12 ++++ 2 files changed, 12 insertions(+), 66 deletions(-) delete mode 100644 .github/workflows/check-liquid.yaml create mode 100644 .github/workflows/run-platformos-check.yaml diff --git a/.github/workflows/check-liquid.yaml b/.github/workflows/check-liquid.yaml deleted file mode 100644 index 4d3363e..0000000 --- a/.github/workflows/check-liquid.yaml +++ /dev/null @@ -1,66 +0,0 @@ -name: Run platformos-check on Liquid files -on: - push: - paths-ignore: - - '**/README.md' - pull_request: - paths-ignore: - - '**/README.md' - -jobs: - check_liquid: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up logs directory - run: | - mkdir -p logs - chmod -R 777 logs - - - name: Start PlatformOS LSP - id: start_lsp - run: | - docker run -i \ - -v ${{ github.workspace }}:${{ github.workspace }} \ - -w ${{ github.workspace }} \ - -e PLATFORMOS_CHECK_DEBUG=true \ - -e PLATFORMOS_CHECK_DEBUG_LOG_FILE=${{ github.workspace }}/logs/platformos-lsp.log \ - platformos/platformos-lsp:latest - - - name: Run platformos-check - id: run_check - if: ${{ steps.start_lsp.outcome == 'success' }} - continue-on-error: true - run: | - set -o pipefail - docker run -i \ - -v ${{ github.workspace }}:${{ github.workspace }} \ - -w ${{ github.workspace }} \ - -e PLATFORMOS_CHECK_DEBUG=true \ - -e PLATFORMOS_CHECK_DEBUG_LOG_FILE=${{ github.workspace }}/logs/platformos-check.log \ - platformos/platformos-check:latest -o json | jq . | tee logs/platformos-check.json - - - name: Upload logs - if: ${{ steps.run_check.outcome == 'success' || steps.run_check.outcome == 'failure' }} - uses: actions/upload-artifact@v4 - with: - name: platformos_check_logs_${{ github.run_id }} - path: | - logs/platformos-lsp.log - logs/platformos-check.json - - - name: Summary of platformos-check - if: ${{ steps.run_check.outcome == 'success' || steps.run_check.outcome == 'failure' }} - run: | - echo "# Summary :checkered_flag:" >> $GITHUB_STEP_SUMMARY - echo "## Result: ${{ steps.run_check.outcome }} ${{ env.result-icon }}" >> $GITHUB_STEP_SUMMARY - env: - result-icon: ${{ steps.run_check.outcome == 'success' && ':white_check_mark:' || ':x:' }} - - - name: Fail job if platformos-check failed - if: ${{ steps.run_check.outcome == 'failure' }} - run: | - echo "platformos-check failed — marking job as failed" - exit 1 diff --git a/.github/workflows/run-platformos-check.yaml b/.github/workflows/run-platformos-check.yaml new file mode 100644 index 0000000..e7c5628 --- /dev/null +++ b/.github/workflows/run-platformos-check.yaml @@ -0,0 +1,12 @@ +name: Run platformos-check on Liquid files +on: + push: + paths-ignore: + - '**/README.md' + pull_request: + paths-ignore: + - '**/README.md' + +jobs: + run-platformos-check: + uses: Platform-OS/gh-workflows/.github/workflows/run-platformos-check.yml@main From 89ee8c9c9ac96f26d2229d075d5732e09fffd139 Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 22:00:57 +0200 Subject: [PATCH 23/32] fix indentation --- .github/workflows/run-platformos-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-platformos-check.yaml b/.github/workflows/run-platformos-check.yaml index e7c5628..f6d3dcf 100644 --- a/.github/workflows/run-platformos-check.yaml +++ b/.github/workflows/run-platformos-check.yaml @@ -9,4 +9,4 @@ on: jobs: run-platformos-check: - uses: Platform-OS/gh-workflows/.github/workflows/run-platformos-check.yml@main + uses: Platform-OS/gh-workflows/.github/workflows/run-platformos-check.yml@main From 941ef5bd25dd97ce53ccb711f605ff51357d952e Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 22:15:56 +0200 Subject: [PATCH 24/32] enable workflow_dispatch trigger for run-platformos-check workflow --- .github/workflows/run-platformos-check.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/run-platformos-check.yaml b/.github/workflows/run-platformos-check.yaml index f6d3dcf..ff25019 100644 --- a/.github/workflows/run-platformos-check.yaml +++ b/.github/workflows/run-platformos-check.yaml @@ -6,6 +6,7 @@ on: pull_request: paths-ignore: - '**/README.md' + workflow_dispatch: jobs: run-platformos-check: From 829bd4fff1d799df232f889c435d40a80ea48e1a Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 22:40:12 +0200 Subject: [PATCH 25/32] rename the caller workflow --- .../{run-platformos-check.yaml => call-platformos-check.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{run-platformos-check.yaml => call-platformos-check.yaml} (100%) diff --git a/.github/workflows/run-platformos-check.yaml b/.github/workflows/call-platformos-check.yaml similarity index 100% rename from .github/workflows/run-platformos-check.yaml rename to .github/workflows/call-platformos-check.yaml From 3ae40e7139c47daa00bb8b17c155666125934900 Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 23:03:27 +0200 Subject: [PATCH 26/32] try to call reusable workflow without specifying a branch --- .github/workflows/call-platformos-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call-platformos-check.yaml b/.github/workflows/call-platformos-check.yaml index ff25019..5def4c5 100644 --- a/.github/workflows/call-platformos-check.yaml +++ b/.github/workflows/call-platformos-check.yaml @@ -10,4 +10,4 @@ on: jobs: run-platformos-check: - uses: Platform-OS/gh-workflows/.github/workflows/run-platformos-check.yml@main + uses: Platform-OS/gh-workflows/.github/workflows/run-platformos-check.yml From 7163fb53cc3da83ed356d8ae29c7a97c0ff19da5 Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 23:07:03 +0200 Subject: [PATCH 27/32] add back reference to repo branch --- .github/workflows/call-platformos-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call-platformos-check.yaml b/.github/workflows/call-platformos-check.yaml index 5def4c5..ff25019 100644 --- a/.github/workflows/call-platformos-check.yaml +++ b/.github/workflows/call-platformos-check.yaml @@ -10,4 +10,4 @@ on: jobs: run-platformos-check: - uses: Platform-OS/gh-workflows/.github/workflows/run-platformos-check.yml + uses: Platform-OS/gh-workflows/.github/workflows/run-platformos-check.yml@main From c476fd0fe1d103bcd35f2a495b0c7a289c76083c Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 23:11:27 +0200 Subject: [PATCH 28/32] use SHA instead of branch name to reference the called workflow the caller-workflow complains that the reusable doesn't exists --- .github/workflows/call-platformos-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call-platformos-check.yaml b/.github/workflows/call-platformos-check.yaml index ff25019..e19675e 100644 --- a/.github/workflows/call-platformos-check.yaml +++ b/.github/workflows/call-platformos-check.yaml @@ -10,4 +10,4 @@ on: jobs: run-platformos-check: - uses: Platform-OS/gh-workflows/.github/workflows/run-platformos-check.yml@main + uses: Platform-OS/gh-workflows/.github/workflows/run-platformos-check.yml@1414c715c98987d4ff35b2b7c949c58712a8d97f From 3b34ed7721217d0511fd42083ed734b2626f07d0 Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 23:39:13 +0200 Subject: [PATCH 29/32] rename reusable workflow --- .github/workflows/call-platformos-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call-platformos-check.yaml b/.github/workflows/call-platformos-check.yaml index e19675e..475324d 100644 --- a/.github/workflows/call-platformos-check.yaml +++ b/.github/workflows/call-platformos-check.yaml @@ -10,4 +10,4 @@ on: jobs: run-platformos-check: - uses: Platform-OS/gh-workflows/.github/workflows/run-platformos-check.yml@1414c715c98987d4ff35b2b7c949c58712a8d97f + uses: Platform-OS/gh-workflows/.github/workflows/run_platformos_check_reusable.yml@main From 5266d6628b95ff48736dc01316dc5d44195a5dc1 Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 23:46:29 +0200 Subject: [PATCH 30/32] test by calling a different reusable workflow --- .github/workflows/call-platformos-check.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/call-platformos-check.yaml b/.github/workflows/call-platformos-check.yaml index 475324d..fe0851b 100644 --- a/.github/workflows/call-platformos-check.yaml +++ b/.github/workflows/call-platformos-check.yaml @@ -10,4 +10,5 @@ on: jobs: run-platformos-check: - uses: Platform-OS/gh-workflows/.github/workflows/run_platformos_check_reusable.yml@main + uses: Platform-OS/gh-workflows/.github/workflows/reserve-and-deploy-cs.yml@main + # uses: Platform-OS/gh-workflows/.github/workflows/run_platformos_check_reusable.yml@main From db404886eba9be96fe0d30ef9095bde381a83f22 Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Wed, 2 Jul 2025 23:54:53 +0200 Subject: [PATCH 31/32] add MPKIT_TOKEN to the env --- .github/workflows/call-platformos-check.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/call-platformos-check.yaml b/.github/workflows/call-platformos-check.yaml index fe0851b..fe0069e 100644 --- a/.github/workflows/call-platformos-check.yaml +++ b/.github/workflows/call-platformos-check.yaml @@ -10,5 +10,6 @@ on: jobs: run-platformos-check: - uses: Platform-OS/gh-workflows/.github/workflows/reserve-and-deploy-cs.yml@main - # uses: Platform-OS/gh-workflows/.github/workflows/run_platformos_check_reusable.yml@main + uses: Platform-OS/gh-workflows/.github/workflows/run_platformos_check_reusable.yml@main + secrets: + MPKIT_TOKEN: ${{ secrets.MPKIT_TOKEN }} From 4d11e8bed131753927e7878684b6ed10100038bd Mon Sep 17 00:00:00 2001 From: Rafal Krysiak Date: Thu, 3 Jul 2025 20:25:36 +0200 Subject: [PATCH 32/32] don't use MPKIT_TOKEN as it's not needed --- .github/workflows/call-platformos-check.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/call-platformos-check.yaml b/.github/workflows/call-platformos-check.yaml index fe0069e..475324d 100644 --- a/.github/workflows/call-platformos-check.yaml +++ b/.github/workflows/call-platformos-check.yaml @@ -11,5 +11,3 @@ on: jobs: run-platformos-check: uses: Platform-OS/gh-workflows/.github/workflows/run_platformos_check_reusable.yml@main - secrets: - MPKIT_TOKEN: ${{ secrets.MPKIT_TOKEN }}