From b9d089d1355f98732d09de09167e656bcec88d87 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Wed, 27 Nov 2024 15:58:42 -0800 Subject: [PATCH 1/4] Allow real Echidna publishing runs from workflow_dispatch --- .github/workflows/w3c-publish.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/w3c-publish.yml b/.github/workflows/w3c-publish.yml index bcb26699dd..cc59aa86e5 100644 --- a/.github/workflows/w3c-publish.yml +++ b/.github/workflows/w3c-publish.yml @@ -15,6 +15,10 @@ on: # Candidate Recommendation Snapshot). workflow_dispatch: inputs: + dry-run: + required: true + type: boolean + description: If set, Echidna will validate but not publish. w3c-status: required: true type: choice @@ -60,7 +64,8 @@ jobs: W3C_ECHIDNA_TOKEN_CORE: ${{ secrets.W3C_ECHIDNA_TOKEN_CORE }} W3C_ECHIDNA_TOKEN_JSAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_JSAPI }} W3C_ECHIDNA_TOKEN_WEBAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_WEBAPI }} - ECHIDNA_DRYRUN: ${{ !(github.event_name == 'push' && github.repository == 'WebAssembly/spec' && github.ref == 'refs/heads/main') }} + ECHIDNA_DRYRUN: ${{ (github.event_name == 'workflow_dispatch' && inputs.dry-run) || + !(github.event_name == 'push' && github.repository == 'WebAssembly/spec' && github.ref == 'refs/heads/main') }} - name: Validate ${{ matrix.spec }} spec with Echidna if: env.W3C_USERNAME run: cd document && make -e -C ${{ matrix.spec }} WD-echidna From fff31f035171642c31c7c880b73383b1b27b704b Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Wed, 27 Nov 2024 16:06:29 -0800 Subject: [PATCH 2/4] multiline string --- .github/workflows/w3c-publish.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/w3c-publish.yml b/.github/workflows/w3c-publish.yml index cc59aa86e5..2f10b0adb2 100644 --- a/.github/workflows/w3c-publish.yml +++ b/.github/workflows/w3c-publish.yml @@ -64,8 +64,9 @@ jobs: W3C_ECHIDNA_TOKEN_CORE: ${{ secrets.W3C_ECHIDNA_TOKEN_CORE }} W3C_ECHIDNA_TOKEN_JSAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_JSAPI }} W3C_ECHIDNA_TOKEN_WEBAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_WEBAPI }} - ECHIDNA_DRYRUN: ${{ (github.event_name == 'workflow_dispatch' && inputs.dry-run) || - !(github.event_name == 'push' && github.repository == 'WebAssembly/spec' && github.ref == 'refs/heads/main') }} + ECHIDNA_DRYRUN: |- + ${{ (github.event_name == 'workflow_dispatch' && inputs.dry-run) || + !(github.event_name == 'push' && github.repository == 'WebAssembly/spec' && github.ref == 'refs/heads/main') }} - name: Validate ${{ matrix.spec }} spec with Echidna if: env.W3C_USERNAME run: cd document && make -e -C ${{ matrix.spec }} WD-echidna From 93550945f767f80552d11d128a6c98ee469d88c1 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Wed, 27 Nov 2024 16:07:26 -0800 Subject: [PATCH 3/4] test if --- .github/workflows/w3c-publish.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/w3c-publish.yml b/.github/workflows/w3c-publish.yml index 2f10b0adb2..ca3d5e43d3 100644 --- a/.github/workflows/w3c-publish.yml +++ b/.github/workflows/w3c-publish.yml @@ -58,7 +58,6 @@ jobs: if: ${{ matrix.spec == 'core' }} run: pip install six && pip install sphinx==5.1.0 - name: Publish ${{ matrix.spec }} spec to its https://www.w3.org/TR/ URL - if: env.W3C_ECHIDNA_TOKEN_CORE run: cd document && make -e -C ${{ matrix.spec }} WD-echidna-CI env: W3C_ECHIDNA_TOKEN_CORE: ${{ secrets.W3C_ECHIDNA_TOKEN_CORE }} From 81f6fe5a3077740595fa1298e5ec07651872cd63 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Wed, 27 Nov 2024 16:10:01 -0800 Subject: [PATCH 4/4] Revert "test if" This reverts commit 93550945f767f80552d11d128a6c98ee469d88c1. --- .github/workflows/w3c-publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/w3c-publish.yml b/.github/workflows/w3c-publish.yml index ca3d5e43d3..2f10b0adb2 100644 --- a/.github/workflows/w3c-publish.yml +++ b/.github/workflows/w3c-publish.yml @@ -58,6 +58,7 @@ jobs: if: ${{ matrix.spec == 'core' }} run: pip install six && pip install sphinx==5.1.0 - name: Publish ${{ matrix.spec }} spec to its https://www.w3.org/TR/ URL + if: env.W3C_ECHIDNA_TOKEN_CORE run: cd document && make -e -C ${{ matrix.spec }} WD-echidna-CI env: W3C_ECHIDNA_TOKEN_CORE: ${{ secrets.W3C_ECHIDNA_TOKEN_CORE }}