From 2fd88240683610b7ee04cd8eff2945fd4d8af66c Mon Sep 17 00:00:00 2001 From: Jonathan Miller <230051081+jmiller-moko@users.noreply.github.com> Date: Sun, 29 Mar 2026 13:12:53 -0500 Subject: [PATCH] chore: update .github/workflows/deploy-rs.yml from MokoStandards --- .github/workflows/deploy-rs.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy-rs.yml b/.github/workflows/deploy-rs.yml index eef55b8..7d5564c 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 -# VERSION: 04.01.00 +# VERSION: 04.02.00 # 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. @@ -70,6 +70,9 @@ permissions: contents: read pull-requests: write +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + jobs: check-permission: name: Verify Deployment Permission @@ -404,8 +407,11 @@ jobs: cd /tmp/mokostandards composer install --no-dev --no-interaction --quiet - - name: Clear remote destination folder - if: steps.source.outputs.skip == 'false' && steps.remote.outputs.skip != 'true' + - name: Clear remote destination folder (manual only) + if: >- + steps.source.outputs.skip == 'false' && + steps.remote.outputs.skip != 'true' && + inputs.clear_remote == true env: SFTP_HOST: ${{ steps.conn.outputs.host }} SFTP_PORT: ${{ steps.conn.outputs.port }} @@ -558,7 +564,7 @@ jobs: rm -f /tmp/deploy_key /tmp/sftp-config.json - name: Create or update failure issue - if: failure() + if: failure() && steps.remote.outputs.skip != 'true' env: GH_TOKEN: ${{ secrets.GH_TOKEN || github.token }} run: | @@ -599,8 +605,8 @@ jobs: --description "Automated deploy failure tracking" \ --force 2>/dev/null || true - # Look for an existing open deploy-failure issue - EXISTING=$(gh api "repos/${REPO}/issues?labels=${LABEL}&state=open&per_page=1" \ + # Look for an existing deploy-failure issue (any state — reopen if closed) + EXISTING=$(gh api "repos/${REPO}/issues?labels=${LABEL}&state=all&per_page=1&sort=created&direction=desc" \ --jq '.[0].number' 2>/dev/null) if [ -n "$EXISTING" ] && [ "$EXISTING" != "null" ]; then @@ -608,14 +614,16 @@ jobs: -X PATCH \ -f title="$TITLE" \ -f body="$BODY" \ + -f state="open" \ --silent - echo "📋 Failure issue #${EXISTING} updated: ${REPO}" >> "$GITHUB_STEP_SUMMARY" + echo "📋 Failure issue #${EXISTING} updated/reopened: ${REPO}" >> "$GITHUB_STEP_SUMMARY" else gh issue create \ --repo "$REPO" \ --title "$TITLE" \ --body "$BODY" \ --label "$LABEL" \ + --assignee "jmiller-moko" \ | tee -a "$GITHUB_STEP_SUMMARY" fi