From c280a11b0d0fe77ebcfdf585bdd180038185244a Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Tue, 23 Dec 2025 01:27:46 +0300 Subject: [PATCH] More attempted fixes to deploy workflow --- .../__tests__/test_main.py | 4 +- .../action.yml | 4 +- .../src/main.py | 2 +- .../__tests__/test_main.py | 2 +- .../action.yml | 5 ++- .../src/main.py | 2 +- .../__tests__/test_main.py | 2 +- .../action.yml | 5 ++- .../src/main.py | 2 +- .../__tests__/test_main.py | 2 +- .../download-build-artifact/action.yml | 5 ++- .../download-build-artifact/src/main.py | 2 +- .../actions/keep-alive/__tests__/test_main.py | 22 ++++++++--- .github/actions/keep-alive/action.yml | 14 +++---- .github/actions/keep-alive/src/main.py | 17 ++------- .../__tests__/test_main.py | 2 +- .../mark-deployment-in-progress/action.yml | 6 ++- .../mark-deployment-in-progress/src/main.py | 2 +- .../__tests__/test_main.py | 2 +- .../update-deployment-status/action.yml | 9 ++++- .../update-deployment-status/src/main.py | 2 +- .github/workflows/deployment-preview.yml | 10 ++--- .github/workflows/deployment-production.yml | 10 ++--- _TODO.md | 38 +++++++++++++++++++ 24 files changed, 114 insertions(+), 57 deletions(-) diff --git a/.github/actions/check-prerequisites-and-locate-build-artifact/__tests__/test_main.py b/.github/actions/check-prerequisites-and-locate-build-artifact/__tests__/test_main.py index 40dc3676b..b2b32eeb7 100644 --- a/.github/actions/check-prerequisites-and-locate-build-artifact/__tests__/test_main.py +++ b/.github/actions/check-prerequisites-and-locate-build-artifact/__tests__/test_main.py @@ -36,7 +36,7 @@ def test_sets_should_deploy_false_when_missing_required_runs(monkeypatch: pytest module = load_action_module() inputs = { - "github-token": "ghs_test", + "token": "ghs_test", "sha": "abc", "required-workflows-json": '[{"id":"lint.yml","label":"Lint"}]', "build-workflow-file": "build-preview.yml", @@ -75,7 +75,7 @@ def test_outputs_artifact_download_url_when_all_prereqs_succeed(monkeypatch: pyt module = load_action_module() inputs = { - "github-token": "ghs_test", + "token": "ghs_test", "sha": "abc", "required-workflows-json": '[{"id":"build-preview.yml","label":"Build Preview"}]', "build-workflow-file": "build-preview.yml", diff --git a/.github/actions/check-prerequisites-and-locate-build-artifact/action.yml b/.github/actions/check-prerequisites-and-locate-build-artifact/action.yml index edf3074e8..ca4a5dd74 100644 --- a/.github/actions/check-prerequisites-and-locate-build-artifact/action.yml +++ b/.github/actions/check-prerequisites-and-locate-build-artifact/action.yml @@ -2,7 +2,7 @@ name: Check Prerequisites and Locate Build Artifact description: Verifies required workflow runs succeeded for a SHA and returns the build artifact download URL. inputs: - github-token: + token: description: GitHub token used to query workflow runs and artifacts. required: true sha: @@ -59,7 +59,7 @@ runs: run: python3 src/main.py shell: bash env: - INPUT_GITHUB_TOKEN: ${{ inputs.github-token }} + INPUT_TOKEN: ${{ inputs.token }} INPUT_SHA: ${{ inputs.sha }} INPUT_TRIGGER_EVENT: ${{ inputs.trigger-event }} INPUT_HEAD_BRANCH: ${{ inputs.head-branch }} diff --git a/.github/actions/check-prerequisites-and-locate-build-artifact/src/main.py b/.github/actions/check-prerequisites-and-locate-build-artifact/src/main.py index 8a94c3c86..24535dc77 100644 --- a/.github/actions/check-prerequisites-and-locate-build-artifact/src/main.py +++ b/.github/actions/check-prerequisites-and-locate-build-artifact/src/main.py @@ -139,7 +139,7 @@ def find_artifact_download_url( def run() -> None: try: - token = get_input_compat("github-token", required=True) + token = get_input_compat("token", required=True) sha = get_input_compat("sha", required=True).strip() trigger_event = get_input_compat("trigger-event") head_branch = get_input_compat("head-branch") diff --git a/.github/actions/create-github-deployment-preview/__tests__/test_main.py b/.github/actions/create-github-deployment-preview/__tests__/test_main.py index 4497cb77e..bc3527d76 100644 --- a/.github/actions/create-github-deployment-preview/__tests__/test_main.py +++ b/.github/actions/create-github-deployment-preview/__tests__/test_main.py @@ -38,7 +38,7 @@ def test_creates_preview_deployment(monkeypatch: pytest.MonkeyPatch) -> None: monkeypatch.setenv("GITHUB_REPOSITORY", "webstackdev/astro.webstackbuilders.com") monkeypatch.setenv("GITHUB_API_URL", "https://api.github.com") - inputs = {"github-token": "ghs_test", "sha": "abc"} + inputs = {"token": "ghs_test", "sha": "abc"} monkeypatch.setattr(module.core, "get_input", lambda name, required=False: inputs.get(name, "")) captured: dict[str, Any] = {} diff --git a/.github/actions/create-github-deployment-preview/action.yml b/.github/actions/create-github-deployment-preview/action.yml index 0db5423b9..d446e7411 100644 --- a/.github/actions/create-github-deployment-preview/action.yml +++ b/.github/actions/create-github-deployment-preview/action.yml @@ -2,7 +2,7 @@ name: Create GitHub Deployment (Preview) description: Creates a GitHub Deployment for preview environment. inputs: - github-token: + token: description: GitHub token used to create the deployment. required: true sha: @@ -22,3 +22,6 @@ runs: working-directory: ${{ github.action_path }} run: python3 src/main.py shell: bash + env: + INPUT_TOKEN: ${{ inputs.token }} + INPUT_SHA: ${{ inputs.sha }} diff --git a/.github/actions/create-github-deployment-preview/src/main.py b/.github/actions/create-github-deployment-preview/src/main.py index 52bb25eef..b69528610 100644 --- a/.github/actions/create-github-deployment-preview/src/main.py +++ b/.github/actions/create-github-deployment-preview/src/main.py @@ -34,7 +34,7 @@ def get_github_api_base_url() -> str: def run() -> None: try: - token = get_input_compat("github-token", required=True) + token = get_input_compat("token", required=True) sha = get_input_compat("sha", required=True).strip() repo_full = (os.environ.get("GITHUB_REPOSITORY") or "").strip() diff --git a/.github/actions/create-github-deployment-production/__tests__/test_main.py b/.github/actions/create-github-deployment-production/__tests__/test_main.py index ef5c44f28..4f1ead4f3 100644 --- a/.github/actions/create-github-deployment-production/__tests__/test_main.py +++ b/.github/actions/create-github-deployment-production/__tests__/test_main.py @@ -38,7 +38,7 @@ def test_creates_production_deployment(monkeypatch: pytest.MonkeyPatch) -> None: monkeypatch.setenv("GITHUB_REPOSITORY", "webstackdev/astro.webstackbuilders.com") monkeypatch.setenv("GITHUB_API_URL", "https://api.github.com") - inputs = {"github-token": "ghs_test", "sha": "abc"} + inputs = {"token": "ghs_test", "sha": "abc"} monkeypatch.setattr(module.core, "get_input", lambda name, required=False: inputs.get(name, "")) captured: dict[str, Any] = {} diff --git a/.github/actions/create-github-deployment-production/action.yml b/.github/actions/create-github-deployment-production/action.yml index 182e7abd0..1b5eb0692 100644 --- a/.github/actions/create-github-deployment-production/action.yml +++ b/.github/actions/create-github-deployment-production/action.yml @@ -2,7 +2,7 @@ name: Create GitHub Deployment (Production) description: Creates a GitHub Deployment for production environment. inputs: - github-token: + token: description: GitHub token used to create the deployment. required: true sha: @@ -22,3 +22,6 @@ runs: working-directory: ${{ github.action_path }} run: python3 src/main.py shell: bash + env: + INPUT_TOKEN: ${{ inputs.token }} + INPUT_SHA: ${{ inputs.sha }} diff --git a/.github/actions/create-github-deployment-production/src/main.py b/.github/actions/create-github-deployment-production/src/main.py index d316455aa..60c8129c2 100644 --- a/.github/actions/create-github-deployment-production/src/main.py +++ b/.github/actions/create-github-deployment-production/src/main.py @@ -34,7 +34,7 @@ def get_github_api_base_url() -> str: def run() -> None: try: - token = get_input_compat("github-token", required=True) + token = get_input_compat("token", required=True) sha = get_input_compat("sha", required=True).strip() repo_full = (os.environ.get("GITHUB_REPOSITORY") or "").strip() diff --git a/.github/actions/download-build-artifact/__tests__/test_main.py b/.github/actions/download-build-artifact/__tests__/test_main.py index 8fe5db117..e1728fd73 100644 --- a/.github/actions/download-build-artifact/__tests__/test_main.py +++ b/.github/actions/download-build-artifact/__tests__/test_main.py @@ -41,7 +41,7 @@ def make_zip_bytes() -> bytes: def test_extracts_vercel_output(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None: module = load_action_module() - inputs = {"github-token": "ghs_test", "artifact-download-url": "https://api.github.com/art.zip"} + inputs = {"token": "ghs_test", "artifact-download-url": "https://api.github.com/art.zip"} monkeypatch.setattr(module.core, "get_input", lambda name, required=False: inputs.get(name, "")) monkeypatch.setenv("GITHUB_API_URL", "https://api.github.com") diff --git a/.github/actions/download-build-artifact/action.yml b/.github/actions/download-build-artifact/action.yml index 758fe37f2..1288568cb 100644 --- a/.github/actions/download-build-artifact/action.yml +++ b/.github/actions/download-build-artifact/action.yml @@ -2,7 +2,7 @@ name: Download Build Artifact description: Downloads a workflow artifact zip and restores it to .vercel/output. inputs: - github-token: + token: description: GitHub token used to download the artifact. required: true artifact-download-url: @@ -16,3 +16,6 @@ runs: working-directory: ${{ github.action_path }} run: python3 src/main.py shell: bash + env: + INPUT_TOKEN: ${{ inputs.token }} + INPUT_ARTIFACT_DOWNLOAD_URL: ${{ inputs.artifact-download-url }} diff --git a/.github/actions/download-build-artifact/src/main.py b/.github/actions/download-build-artifact/src/main.py index 49e9e7be6..47c7c514c 100644 --- a/.github/actions/download-build-artifact/src/main.py +++ b/.github/actions/download-build-artifact/src/main.py @@ -44,7 +44,7 @@ def is_allowed_fetch_url(url: str, allowed_hosts: set[str]) -> bool: def run() -> None: try: - token = get_input_compat("github-token", required=True) + token = get_input_compat("token", required=True) download_url = get_input_compat("artifact-download-url", required=True).strip() allowed_hosts = {urlparse(get_github_api_base_url()).hostname} diff --git a/.github/actions/keep-alive/__tests__/test_main.py b/.github/actions/keep-alive/__tests__/test_main.py index a1fc504fd..4c23abc2d 100644 --- a/.github/actions/keep-alive/__tests__/test_main.py +++ b/.github/actions/keep-alive/__tests__/test_main.py @@ -59,9 +59,14 @@ def fake_create_client_sync(**kwargs): def test_executes_select_1_and_closes_client(monkeypatch: pytest.MonkeyPatch) -> None: module = load_action_module() - monkeypatch.setenv("ASTRO_DB_REMOTE_URL", "libsql://example.turso.io") - monkeypatch.setenv("ASTRO_DB_APP_TOKEN", "token") - monkeypatch.setattr(module.core, "get_input", lambda name, required=False: "") + def fake_get_input(name: str, required: bool = False) -> str: + if name == "astro-db-remote-url": + return "libsql://example.turso.io" + if name == "astro-db-app-token": + return "token" + return "" + + monkeypatch.setattr(module.core, "get_input", fake_get_input) infos: list[str] = [] failures: list[str] = [] @@ -130,9 +135,14 @@ def fake_create_client_sync(**kwargs): def test_normalizes_libsql_url_to_include_trailing_slash(monkeypatch: pytest.MonkeyPatch) -> None: module = load_action_module() - monkeypatch.setenv("ASTRO_DB_REMOTE_URL", "libsql://example.turso.io") - monkeypatch.setenv("ASTRO_DB_APP_TOKEN", "token") - monkeypatch.setattr(module.core, "get_input", lambda name, required=False: "") + def fake_get_input(name: str, required: bool = False) -> str: + if name == "astro-db-remote-url": + return "libsql://example.turso.io" + if name == "astro-db-app-token": + return "token" + return "" + + monkeypatch.setattr(module.core, "get_input", fake_get_input) captured: dict[str, str] = {} diff --git a/.github/actions/keep-alive/action.yml b/.github/actions/keep-alive/action.yml index aae2f5c7a..68d80bca2 100644 --- a/.github/actions/keep-alive/action.yml +++ b/.github/actions/keep-alive/action.yml @@ -3,13 +3,11 @@ description: Executes a keep-alive query (SELECT 1) against the Turso DB. inputs: astro-db-remote-url: - description: Turso DB URL (falls back to ASTRO_DB_REMOTE_URL env var). - required: false - default: "" + description: Turso DB URL. + required: true astro-db-app-token: - description: Turso auth token (falls back to ASTRO_DB_APP_TOKEN env var). - required: false - default: "" + description: Turso auth token. + required: true runs: using: composite @@ -19,5 +17,5 @@ runs: run: python3 src/main.py shell: bash env: - ASTRO_DB_REMOTE_URL: ${{ inputs.astro-db-remote-url }} - ASTRO_DB_APP_TOKEN: ${{ inputs.astro-db-app-token }} + INPUT_ASTRO_DB_REMOTE_URL: ${{ inputs.astro-db-remote-url }} + INPUT_ASTRO_DB_APP_TOKEN: ${{ inputs.astro-db-app-token }} diff --git a/.github/actions/keep-alive/src/main.py b/.github/actions/keep-alive/src/main.py index a7e812b7b..bba6cb9a9 100644 --- a/.github/actions/keep-alive/src/main.py +++ b/.github/actions/keep-alive/src/main.py @@ -1,19 +1,10 @@ from __future__ import annotations -import os import urllib.parse from actions_toolkit import core from libsql_client import create_client_sync - -def get_optional_input_or_env(input_name: str, env_name: str) -> str: - value = core.get_input(input_name).strip() - if value: - return value - return (os.environ.get(env_name) or "").strip() - - def get_required_value(value: str, label: str) -> str: trimmed = value.strip() if not trimmed: @@ -36,11 +27,11 @@ def normalize_libsql_url(url: str) -> str: def run() -> None: try: - url = get_optional_input_or_env("astro-db-remote-url", "ASTRO_DB_REMOTE_URL") - auth_token = get_optional_input_or_env("astro-db-app-token", "ASTRO_DB_APP_TOKEN") + url = core.get_input("astro-db-remote-url", required=True) + auth_token = core.get_input("astro-db-app-token", required=True) - required_url = normalize_libsql_url(get_required_value(url, "ASTRO_DB_REMOTE_URL")) - required_auth_token = get_required_value(auth_token, "ASTRO_DB_APP_TOKEN") + required_url = normalize_libsql_url(get_required_value(url, "astro-db-remote-url")) + required_auth_token = get_required_value(auth_token, "astro-db-app-token") client = create_client_sync(url=required_url, auth_token=required_auth_token) try: diff --git a/.github/actions/mark-deployment-in-progress/__tests__/test_main.py b/.github/actions/mark-deployment-in-progress/__tests__/test_main.py index 4487790b3..6aee40eeb 100644 --- a/.github/actions/mark-deployment-in-progress/__tests__/test_main.py +++ b/.github/actions/mark-deployment-in-progress/__tests__/test_main.py @@ -36,7 +36,7 @@ def test_posts_in_progress_status(monkeypatch: pytest.MonkeyPatch) -> None: monkeypatch.setenv("GITHUB_RUN_ID", "123") monkeypatch.setenv("GITHUB_SERVER_URL", "https://github.com") - inputs = {"github-token": "ghs_test", "deployment-id": "42", "description": "Deploying"} + inputs = {"token": "ghs_test", "deployment-id": "42", "description": "Deploying"} monkeypatch.setattr(module.core, "get_input", lambda name, required=False: inputs.get(name, "")) captured: dict[str, Any] = {} diff --git a/.github/actions/mark-deployment-in-progress/action.yml b/.github/actions/mark-deployment-in-progress/action.yml index 5a7a97cb2..c4785e7ea 100644 --- a/.github/actions/mark-deployment-in-progress/action.yml +++ b/.github/actions/mark-deployment-in-progress/action.yml @@ -2,7 +2,7 @@ name: Mark Deployment in Progress description: Sets deployment status to in_progress for a deployment id. inputs: - github-token: + token: description: GitHub token used to create deployment statuses. required: true deployment-id: @@ -19,3 +19,7 @@ runs: working-directory: ${{ github.action_path }} run: python3 src/main.py shell: bash + env: + INPUT_TOKEN: ${{ inputs.token }} + INPUT_DEPLOYMENT_ID: ${{ inputs.deployment-id }} + INPUT_DESCRIPTION: ${{ inputs.description }} diff --git a/.github/actions/mark-deployment-in-progress/src/main.py b/.github/actions/mark-deployment-in-progress/src/main.py index afca73d99..b9d0e365c 100644 --- a/.github/actions/mark-deployment-in-progress/src/main.py +++ b/.github/actions/mark-deployment-in-progress/src/main.py @@ -34,7 +34,7 @@ def get_github_api_base_url() -> str: def run() -> None: try: - token = get_input_compat("github-token", required=True) + token = get_input_compat("token", required=True) deployment_id = get_input_compat("deployment-id", required=True).strip() description = get_input_compat("description", required=True).strip() diff --git a/.github/actions/update-deployment-status/__tests__/test_main.py b/.github/actions/update-deployment-status/__tests__/test_main.py index d947243d9..ccc8179af 100644 --- a/.github/actions/update-deployment-status/__tests__/test_main.py +++ b/.github/actions/update-deployment-status/__tests__/test_main.py @@ -37,7 +37,7 @@ def test_sets_success_status(monkeypatch: pytest.MonkeyPatch) -> None: monkeypatch.setenv("GITHUB_SERVER_URL", "https://github.com") inputs = { - "github-token": "ghs_test", + "token": "ghs_test", "deployment-id": "7", "exit-code": "0", "environment-url": "https://example", diff --git a/.github/actions/update-deployment-status/action.yml b/.github/actions/update-deployment-status/action.yml index 7806d1af3..b65d3b121 100644 --- a/.github/actions/update-deployment-status/action.yml +++ b/.github/actions/update-deployment-status/action.yml @@ -2,7 +2,7 @@ name: Update Deployment Status description: Updates a GitHub Deployment status to success or failure, optionally setting environment_url. inputs: - github-token: + token: description: GitHub token used to create deployment statuses. required: true deployment-id: @@ -29,3 +29,10 @@ runs: working-directory: ${{ github.action_path }} run: python3 src/main.py shell: bash + env: + INPUT_TOKEN: ${{ inputs.token }} + INPUT_DEPLOYMENT_ID: ${{ inputs.deployment-id }} + INPUT_EXIT_CODE: ${{ inputs.exit-code }} + INPUT_ENVIRONMENT_URL: ${{ inputs.environment-url }} + INPUT_SUCCESS_DESCRIPTION: ${{ inputs.success-description }} + INPUT_FAILURE_DESCRIPTION: ${{ inputs.failure-description }} diff --git a/.github/actions/update-deployment-status/src/main.py b/.github/actions/update-deployment-status/src/main.py index 3d99571ed..ecdd8ab07 100644 --- a/.github/actions/update-deployment-status/src/main.py +++ b/.github/actions/update-deployment-status/src/main.py @@ -34,7 +34,7 @@ def get_github_api_base_url() -> str: def run() -> None: try: - token = get_input_compat("github-token", required=True) + token = get_input_compat("token", required=True) deployment_id = get_input_compat("deployment-id", required=True).strip() exit_code = int(get_input_compat("exit-code", required=True).strip() or "1") environment_url = (get_input_compat("environment-url") or "").strip() diff --git a/.github/workflows/deployment-preview.yml b/.github/workflows/deployment-preview.yml index 19334a0ea..20194178b 100644 --- a/.github/workflows/deployment-preview.yml +++ b/.github/workflows/deployment-preview.yml @@ -54,7 +54,7 @@ jobs: id: verify uses: './.github/actions/check-prerequisites-and-locate-build-artifact' with: - github-token: ${{ github.token }} + token: ${{ github.token }} sha: ${{ steps.context.outputs.sha }} trigger-event: ${{ steps.context.outputs.trigger_event }} head-branch: ${{ steps.context.outputs.head_branch }} @@ -71,7 +71,7 @@ jobs: if: steps.verify.outputs.should_deploy == 'true' uses: './.github/actions/download-build-artifact' with: - github-token: ${{ github.token }} + token: ${{ github.token }} artifact-download-url: ${{ steps.verify.outputs.artifact_download_url }} - name: Create GitHub deployment (preview) @@ -79,14 +79,14 @@ jobs: id: gh_deploy uses: './.github/actions/create-github-deployment-preview' with: - github-token: ${{ github.token }} + token: ${{ github.token }} sha: ${{ steps.context.outputs.sha }} - name: Mark deployment in progress if: steps.verify.outputs.should_deploy == 'true' uses: './.github/actions/mark-deployment-in-progress' with: - github-token: ${{ github.token }} + token: ${{ github.token }} deployment-id: ${{ steps.gh_deploy.outputs.deployment_id }} description: Deploying to Vercel (preview) @@ -109,7 +109,7 @@ jobs: if: steps.verify.outputs.should_deploy == 'true' uses: './.github/actions/update-deployment-status' with: - github-token: ${{ github.token }} + token: ${{ github.token }} deployment-id: ${{ steps.gh_deploy.outputs.deployment_id }} exit-code: ${{ steps.vercel.outputs.exit_code }} environment-url: ${{ steps.vercel.outputs.deploy_url }} diff --git a/.github/workflows/deployment-production.yml b/.github/workflows/deployment-production.yml index 81e68f9f0..be28734a1 100644 --- a/.github/workflows/deployment-production.yml +++ b/.github/workflows/deployment-production.yml @@ -51,7 +51,7 @@ jobs: id: verify uses: './.github/actions/check-prerequisites-and-locate-build-artifact' with: - github-token: ${{ github.token }} + token: ${{ github.token }} sha: ${{ steps.context.outputs.sha }} trigger-event: ${{ steps.context.outputs.trigger_event }} head-branch: ${{ steps.context.outputs.head_branch }} @@ -67,7 +67,7 @@ jobs: if: steps.verify.outputs.should_deploy == 'true' uses: './.github/actions/download-build-artifact' with: - github-token: ${{ github.token }} + token: ${{ github.token }} artifact-download-url: ${{ steps.verify.outputs.artifact_download_url }} - name: Create GitHub deployment (production) @@ -75,14 +75,14 @@ jobs: id: gh_deploy uses: './.github/actions/create-github-deployment-production' with: - github-token: ${{ github.token }} + token: ${{ github.token }} sha: ${{ steps.context.outputs.sha }} - name: Mark deployment in progress if: steps.verify.outputs.should_deploy == 'true' uses: './.github/actions/mark-deployment-in-progress' with: - github-token: ${{ github.token }} + token: ${{ github.token }} deployment-id: ${{ steps.gh_deploy.outputs.deployment_id }} description: Deploying to Vercel (production) @@ -105,7 +105,7 @@ jobs: if: steps.verify.outputs.should_deploy == 'true' uses: './.github/actions/update-deployment-status' with: - github-token: ${{ github.token }} + token: ${{ github.token }} deployment-id: ${{ steps.gh_deploy.outputs.deployment_id }} exit-code: ${{ steps.vercel.outputs.exit_code }} environment-url: ${{ steps.vercel.outputs.deploy_url }} diff --git a/_TODO.md b/_TODO.md index d0fa8e8d0..5f58cca6f 100644 --- a/_TODO.md +++ b/_TODO.md @@ -203,3 +203,41 @@ Google Calendar, Apple Calendar, Microsoft Outlook and Teams, and generate iCal `https://github.com/add2cal/add-to-calendar-button` `https://add-to-calendar-button.com/` + +Here are the most plausible causes, ranked, with evidence from your repo: + +1. Composite action inputs aren't being exported to `INPUT_*` for `run:` steps (so `actions_toolkit` can't read them) + +- Your passing action `check-prerequisites-and-locate-build-artifact` manually exports inputs into env: (e.g. `INPUT_GITHUB_TOKEN: ${{ inputs.github-token }}`). + +- The failing action `download-build-artifact` (and also `create-github-deployment-preview`, `mark-deployment-in-progress`, `update-deployment-status`) does not export any `INPUT_*` env vars. + +- If the runner doesn't auto-populate `INPUT_*` for composite `run:` steps (or changed behavior), then `core.get_input(...)` will think the input is missing and throw exactly what you're seeing. + +2. `actions_toolkit` is looking for `INPUT_GITHUB_TOKEN` (underscore), but only `INPUT_GITHUB-TOKEN` (dash) exists (or vice versa) + +- The fact that action.yml explicitly sets `INPUT_GITHUB_TOKEN` is a big hint that at least one of your toolchains expects the underscore variant. + +- If the runner provides only the dashed form but the toolkit reads only the underscored form (or the opposite), you'll get "Input required and not supplied" even though the workflow shows the with: value. + +3. The deploy workflow is executing main's actions, not the branch you think you fixed + +- `deployment-preview.yml` checks out ref: main. For a `workflow_run` trigger, that makes it easy to end up running local actions from main even if you "fixed it" elsewhere previously. + +- Symptom: you "keep fixing" but the preview run keeps behaving like an older version. + +4. The `"with: github-token: ***"` line can be misleading if the expression resolves empty + +- `github.token` should exist, but edge cases (permissions mis-specified, workflow context differences, or job-level permission not applied the way you expect for `workflow_run`) can produce a token that's unusable or empty. + +- This would be rarer than (1)/(2), but it still manifests as "required input missing". + +5. The error text is from the library's normalization, not a literal requested key + +- You don't have any repo code that calls `get_input("GITHUB-TOKEN")` literally; everything calls `get_input_compat("github-token", required=True)`. + +- Many toolkits uppercase / normalize the input name when reporting it, so `GITHUB-TOKEN` in the error can still correspond to `github-token` as defined. + +If you want a single "most likely" call: based on the repo evidence, (1) is the top suspect — it explains why the prereq action works (it exports env) and the next composite Python action fails (it doesn't). + +