From 4069834b7cab4e3f9d2d7648a7d2117ad17eec48 Mon Sep 17 00:00:00 2001 From: Jonathan Miller <230051081+jmiller-moko@users.noreply.github.com> Date: Tue, 7 Apr 2026 16:37:42 -0500 Subject: [PATCH] ci: sync all workflows from MokoStandards v04.05 Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/deploy-demo.yml | 19 ++++++++++++------- .github/workflows/deploy-dev.yml | 2 +- .github/workflows/deploy-rs.yml | 19 ++++++++++++------- .../workflows/enterprise-firewall-setup.yml | 2 +- .github/workflows/repository-cleanup.yml | 2 +- .github/workflows/sync-version-on-merge.yml | 2 +- 6 files changed, 28 insertions(+), 18 deletions(-) diff --git a/.github/workflows/deploy-demo.yml b/.github/workflows/deploy-demo.yml index 7f785bf..45c0a5f 100644 --- a/.github/workflows/deploy-demo.yml +++ b/.github/workflows/deploy-demo.yml @@ -22,7 +22,7 @@ # INGROUP: MokoStandards.Deploy # REPO: https://github.com/mokoconsulting-tech/MokoStandards # PATH: /templates/workflows/shared/deploy-demo.yml.template -# VERSION: 04.05.00 +# VERSION: 04.05.13 # BRIEF: SFTP deployment workflow for demo server — synced to all governed repos # NOTE: Synced via bulk-repo-sync to .github/workflows/deploy-demo.yml in all governed repos. # Port is resolved in order: DEMO_FTP_PORT variable → :port suffix in DEMO_FTP_HOST → 22. @@ -296,6 +296,12 @@ jobs: HOST="$HOST_RAW" PORT="$PORT_VAR" + if [ -z "$HOST" ]; then + echo "⏭️ DEMO_FTP_HOST not configured — skipping demo deployment." + echo "skip=true" >> "$GITHUB_OUTPUT" + exit 0 + fi + # Priority 1 — explicit DEMO_FTP_PORT variable if [ -n "$PORT" ]; then echo "ℹ️ Using explicit DEMO_FTP_PORT=${PORT}" @@ -317,7 +323,7 @@ jobs: echo "SFTP target: ${HOST}:${PORT}" - name: Build remote path - if: steps.source.outputs.skip == 'false' + if: steps.source.outputs.skip == 'false' && steps.conn.outputs.skip != 'true' id: remote env: DEMO_FTP_PATH: ${{ vars.DEMO_FTP_PATH }} @@ -326,10 +332,9 @@ jobs: BASE="$DEMO_FTP_PATH" if [ -z "$BASE" ]; then - echo "❌ DEMO_FTP_PATH is not set." - echo " Configure it as an org-level variable (Settings → Variables) and" - echo " ensure this repository has been granted access to it." - exit 1 + echo "⏭️ DEMO_FTP_PATH not configured — skipping demo deployment." + echo "skip=true" >> "$GITHUB_OUTPUT" + exit 0 fi # DEMO_FTP_SUFFIX is required — it identifies the remote subdirectory for this repo. @@ -640,7 +645,7 @@ jobs: rm -f /tmp/deploy_key /tmp/sftp-config.json - name: Create or update failure issue - if: failure() && steps.remote.outputs.skip != 'true' + if: failure() && steps.remote.outputs.skip != 'true' && steps.conn.outputs.skip != 'true' env: GH_TOKEN: ${{ secrets.GH_TOKEN || github.token }} run: | diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index 7019628..af275da 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -22,7 +22,7 @@ # INGROUP: MokoStandards.Deploy # REPO: https://github.com/mokoconsulting-tech/MokoStandards # PATH: /templates/workflows/shared/deploy-dev.yml.template -# VERSION: 04.05.00 +# VERSION: 04.05.13 # BRIEF: SFTP deployment workflow for development server — synced to all governed repos # NOTE: Synced via bulk-repo-sync to .github/workflows/deploy-dev.yml in all governed repos. # Port is resolved in order: DEV_FTP_PORT variable → :port suffix in DEV_FTP_HOST → 22. diff --git a/.github/workflows/deploy-rs.yml b/.github/workflows/deploy-rs.yml index bf9a779..5f9f8da 100644 --- a/.github/workflows/deploy-rs.yml +++ b/.github/workflows/deploy-rs.yml @@ -22,7 +22,7 @@ # INGROUP: MokoStandards.Deploy # REPO: https://github.com/mokoconsulting-tech/MokoStandards # PATH: /templates/workflows/shared/deploy-rs.yml.template -# VERSION: 04.05.00 +# VERSION: 04.05.13 # BRIEF: SFTP deployment workflow for release staging server — synced to all governed repos # NOTE: Synced via bulk-repo-sync to .github/workflows/deploy-rs.yml in all governed repos. # Port is resolved in order: RS_FTP_PORT variable → :port suffix in RS_FTP_HOST → 22. @@ -296,6 +296,12 @@ jobs: HOST="$HOST_RAW" PORT="$PORT_VAR" + if [ -z "$HOST" ]; then + echo "⏭️ RS_FTP_HOST not configured — skipping RS deployment." + echo "skip=true" >> "$GITHUB_OUTPUT" + exit 0 + fi + # Priority 1 — explicit RS_FTP_PORT variable if [ -n "$PORT" ]; then echo "ℹ️ Using explicit RS_FTP_PORT=${PORT}" @@ -317,7 +323,7 @@ jobs: echo "SFTP target: ${HOST}:${PORT}" - name: Build remote path - if: steps.source.outputs.skip == 'false' + if: steps.source.outputs.skip == 'false' && steps.conn.outputs.skip != 'true' id: remote env: RS_FTP_PATH: ${{ vars.RS_FTP_PATH }} @@ -326,10 +332,9 @@ jobs: BASE="$RS_FTP_PATH" if [ -z "$BASE" ]; then - echo "❌ RS_FTP_PATH is not set." - echo " Configure it as an org-level variable (Settings → Variables) and" - echo " ensure this repository has been granted access to it." - exit 1 + echo "⏭️ RS_FTP_PATH not configured — skipping RS deployment." + echo "skip=true" >> "$GITHUB_OUTPUT" + exit 0 fi # RS_FTP_SUFFIX is required — it identifies the remote subdirectory for this repo. @@ -567,7 +572,7 @@ jobs: rm -f /tmp/deploy_key /tmp/sftp-config.json - name: Create or update failure issue - if: failure() && steps.remote.outputs.skip != 'true' + if: failure() && steps.remote.outputs.skip != 'true' && steps.conn.outputs.skip != 'true' env: GH_TOKEN: ${{ secrets.GH_TOKEN || github.token }} run: | diff --git a/.github/workflows/enterprise-firewall-setup.yml b/.github/workflows/enterprise-firewall-setup.yml index 8979107..b6cf7ab 100644 --- a/.github/workflows/enterprise-firewall-setup.yml +++ b/.github/workflows/enterprise-firewall-setup.yml @@ -22,7 +22,7 @@ # INGROUP: MokoStandards.Firewall # REPO: https://github.com/mokoconsulting-tech/MokoStandards # PATH: /templates/workflows/shared/enterprise-firewall-setup.yml.template -# VERSION: 04.05.00 +# VERSION: 04.05.13 # BRIEF: Enterprise firewall configuration — generates outbound allow-rules including SFTP deployment server # NOTE: Reads DEV_FTP_HOST / DEV_FTP_PORT variables to include SFTP egress rules alongside HTTPS rules. diff --git a/.github/workflows/repository-cleanup.yml b/.github/workflows/repository-cleanup.yml index e77c279..b078061 100644 --- a/.github/workflows/repository-cleanup.yml +++ b/.github/workflows/repository-cleanup.yml @@ -9,7 +9,7 @@ # INGROUP: MokoStandards.Maintenance # REPO: https://github.com/mokoconsulting-tech/MokoStandards # PATH: /templates/workflows/shared/repository-cleanup.yml.template -# VERSION: 04.05.00 +# VERSION: 04.05.13 # BRIEF: Recurring repository maintenance — labels, branches, workflows, logs, doc indexes # NOTE: Synced via bulk-repo-sync to .github/workflows/repository-cleanup.yml in all governed repos. # Runs on the 1st and 15th of each month at 6:00 AM UTC, and on manual dispatch. diff --git a/.github/workflows/sync-version-on-merge.yml b/.github/workflows/sync-version-on-merge.yml index 5c60d37..7b2ef6c 100644 --- a/.github/workflows/sync-version-on-merge.yml +++ b/.github/workflows/sync-version-on-merge.yml @@ -9,7 +9,7 @@ # INGROUP: MokoStandards.Automation # REPO: https://github.com/mokoconsulting-tech/MokoStandards # PATH: /templates/workflows/shared/sync-version-on-merge.yml.template -# VERSION: 04.05.00 +# VERSION: 04.05.13 # BRIEF: Auto-bump patch version on every push to main and propagate to all file headers # NOTE: Synced via bulk-repo-sync to .github/workflows/sync-version-on-merge.yml in all governed repos. # README.md is the single source of truth for the repository version.