diff --git a/.github/actions/export-load-balancer-tokens/action.yml b/.github/actions/export-load-balancer-tokens/action.yml index f4de6c01f..85ddb2325 100644 --- a/.github/actions/export-load-balancer-tokens/action.yml +++ b/.github/actions/export-load-balancer-tokens/action.yml @@ -50,9 +50,19 @@ runs: export_var() { local name="$1" - local value="$2" - if [ -n "${value:-}" ]; then - echo "${name}=${value}" >>"${GITHUB_ENV}" + local value="${2-}" + if [ -z "${value}" ]; then + return 0 + fi + + if [[ "${value}" == *$'\n'* ]]; then + { + echo "${name}<>"${GITHUB_ENV}" + else + printf '%s=%s\n' "${name}" "${value}" >>"${GITHUB_ENV}" fi } diff --git a/.github/workflows/agents-auto-pilot.yml b/.github/workflows/agents-auto-pilot.yml index 3a3593c76..981bd066d 100644 --- a/.github/workflows/agents-auto-pilot.yml +++ b/.github/workflows/agents-auto-pilot.yml @@ -116,6 +116,7 @@ jobs: uses: actions/checkout@v6 - name: Export load balancer tokens + if: steps.check_enabled.outputs.enabled == 'true' uses: ./.github/actions/export-load-balancer-tokens with: github_token: ${{ github.token }} diff --git a/.github/workflows/health-70-validate-sync-manifest.yml b/.github/workflows/health-70-validate-sync-manifest.yml index 2d21437c3..d75e67f98 100644 --- a/.github/workflows/health-70-validate-sync-manifest.yml +++ b/.github/workflows/health-70-validate-sync-manifest.yml @@ -231,16 +231,16 @@ jobs: This PR modifies files that should be synced to consumer repos, but the sync manifest is incomplete. - **Required action:** Update \.github/sync-manifest.yml\ to include the new/modified files. + **Required action:** Update `.github/sync-manifest.yml` to include the new/modified files. ### Why this matters Files not declared in the manifest won't be synced to consumer repos (Template, Manager-Database, trip-planner, Travel-Plan-Permission), causing features to silently not work in those repos. ### How to fix - 1. Open \.github/sync-manifest.yml\ + 1. Open `.github/sync-manifest.yml` 2. Add your new files to the appropriate section (workflows, prompts, scripts, etc.) - 3. Include a \description\ explaining what the file does - 4. If the file should NOT be synced, add it to \excluded:\ with a reason + 3. Include a `description` explaining what the file does + 4. If the file should NOT be synced, add it to `excluded:` with a reason See the workflow logs for specific files that need to be added.`; diff --git a/templates/consumer-repo/.github/actions/export-load-balancer-tokens/action.yml b/templates/consumer-repo/.github/actions/export-load-balancer-tokens/action.yml index f4de6c01f..85ddb2325 100644 --- a/templates/consumer-repo/.github/actions/export-load-balancer-tokens/action.yml +++ b/templates/consumer-repo/.github/actions/export-load-balancer-tokens/action.yml @@ -50,9 +50,19 @@ runs: export_var() { local name="$1" - local value="$2" - if [ -n "${value:-}" ]; then - echo "${name}=${value}" >>"${GITHUB_ENV}" + local value="${2-}" + if [ -z "${value}" ]; then + return 0 + fi + + if [[ "${value}" == *$'\n'* ]]; then + { + echo "${name}<>"${GITHUB_ENV}" + else + printf '%s=%s\n' "${name}" "${value}" >>"${GITHUB_ENV}" fi }