From 82f372e74b90155aa95df42250282dd7ff03f41c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 17 Dec 2025 13:11:40 +0000 Subject: [PATCH 1/3] Initial plan From 866fe90d4612e13a31a21f8009619420b75da519 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 17 Dec 2025 13:16:57 +0000 Subject: [PATCH 2/3] Fix rhiza command usage to pass directory instead of file path Co-authored-by: tschm <2046079+tschm@users.noreply.github.com> --- action.yml | 18 ++++++++++++++++-- tests/test-action.sh | 4 ++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index b1bbfd2..cada8ca 100644 --- a/action.yml +++ b/action.yml @@ -58,7 +58,14 @@ runs: - name: Validate rhiza configuration shell: bash run: | - uvx rhiza validate "${{ inputs.source }}" + CONFIG_FILE="${{ inputs.source }}" + + # If config file is not in the root as template.yml, copy it there temporarily + if [[ "$CONFIG_FILE" != "template.yml" ]] && [[ "$CONFIG_FILE" != "./template.yml" ]]; then + cp "$CONFIG_FILE" template.yml + fi + + uvx rhiza validate . # ------------------------------------------------------------ # Materialize + commit changes @@ -69,9 +76,16 @@ runs: run: | set -euo pipefail + CONFIG_FILE="${{ inputs.source }}" + + # If config file is not in the root as template.yml, copy it there temporarily + if [[ "$CONFIG_FILE" != "template.yml" ]] && [[ "$CONFIG_FILE" != "./template.yml" ]]; then + cp "$CONFIG_FILE" template.yml + fi + git checkout -B "${{ inputs.branch }}" - uvx rhiza materialize "${{ inputs.source }}" + uvx rhiza materialize . git add -A diff --git a/tests/test-action.sh b/tests/test-action.sh index 28d06f9..9ef904b 100755 --- a/tests/test-action.sh +++ b/tests/test-action.sh @@ -122,11 +122,11 @@ EOF # Run rhiza (this is what the action does) # ------------------------------------------------------------ echo -e "${YELLOW}Running rhiza validate${NC}" -uvx rhiza validate template.yml +uvx rhiza validate . echo -e "${YELLOW}Running rhiza materialize${NC}" git checkout -B sync/template-update -uvx rhiza materialize template.yml +uvx rhiza materialize . git add -A git commit -qm "chore: sync template" From 1987245d5083c5c0602c4234b890845a266cfcd7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 17 Dec 2025 13:35:12 +0000 Subject: [PATCH 3/3] Remove inputs.source parameter - rhiza uses .github/template.yml by default Co-authored-by: tschm <2046079+tschm@users.noreply.github.com> --- action.yml | 21 +-------------------- tests/test-action.sh | 3 ++- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/action.yml b/action.yml index cada8ca..55a92b8 100644 --- a/action.yml +++ b/action.yml @@ -7,10 +7,6 @@ inputs: description: GitHub token or PAT for authentication required: true - source: - description: Path to the YAML configuration file containing template settings - required: true - branch: description: Target branch for the sync required: false @@ -57,15 +53,7 @@ runs: # ------------------------------------------------------------ - name: Validate rhiza configuration shell: bash - run: | - CONFIG_FILE="${{ inputs.source }}" - - # If config file is not in the root as template.yml, copy it there temporarily - if [[ "$CONFIG_FILE" != "template.yml" ]] && [[ "$CONFIG_FILE" != "./template.yml" ]]; then - cp "$CONFIG_FILE" template.yml - fi - - uvx rhiza validate . + run: uvx rhiza validate . # ------------------------------------------------------------ # Materialize + commit changes @@ -76,13 +64,6 @@ runs: run: | set -euo pipefail - CONFIG_FILE="${{ inputs.source }}" - - # If config file is not in the root as template.yml, copy it there temporarily - if [[ "$CONFIG_FILE" != "template.yml" ]] && [[ "$CONFIG_FILE" != "./template.yml" ]]; then - cp "$CONFIG_FILE" template.yml - fi - git checkout -B "${{ inputs.branch }}" uvx rhiza materialize . diff --git a/tests/test-action.sh b/tests/test-action.sh index 9ef904b..0e193a1 100755 --- a/tests/test-action.sh +++ b/tests/test-action.sh @@ -106,7 +106,8 @@ git branch -M main # ------------------------------------------------------------ # Rhiza config # ------------------------------------------------------------ -cat > template.yml < .github/template.yml <