1717 description : " rc|patch|minor|major"
1818 required : true
1919 default : " rc"
20- allow_older :
21- description : " Allow deploying older than latest tested on main?"
22- required : false
23- type : choice
24- options : ["false","true"]
25- default : " false"
2620 reason :
2721 description : " Why are you doing a manual deployment?"
2822 required : true
@@ -42,37 +36,35 @@ jobs:
4236 latest_sha : ${{ steps.resolver.outputs.latest_test_sha }}
4337 release_type : ${{ steps.release_type.outputs.release_type }}
4438
39+ env :
40+ PREPROD_WORKFLOW_ID : " 182365668"
41+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
42+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
43+
4544 steps :
4645 - name : Checkout (full history & tags)
4746 uses : actions/checkout@v4
4847 with : { fetch-depth: 0 }
4948
50- - name : Announce candidate ref
51- id : announce
49+ - name : Force HTTPS remote for act
50+ if : env.ACT == 'true'
51+ env :
52+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
53+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5254 shell : bash
5355 run : |
5456 set -euo pipefail
55- git fetch --tags --force --quiet
57+ # Mask the token in logs (defense in depth)
58+ echo "::add-mask::${GITHUB_TOKEN}"
59+ # Option 1: rewrite just 'origin' to tokenized HTTPS
60+ git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git"
61+ # Sanity check (will fail if token is missing/insufficient)
62+ git ls-remote --tags origin >/dev/null
5663
57- if [[ "${{ github.event_name }}" == "workflow_run" ]]; then
58- HEAD="${{ github.event.workflow_run.head_sha }}"
59- TAG="$(git tag --points-at "$HEAD" | grep '^dev-' | head -n1 || true)"
60- else
61- HEAD="$(git rev-list -n1 "${{ github.event.inputs.ref }}")"
62- TAG="${{ github.event.inputs.ref }}"
63- fi
64-
65- echo "CANDIDATE_TAG=$TAG"
66- echo "CANDIDATE_SHA=$HEAD"
67-
68- # Nice UI hints
69- echo "::notice title=PreProd candidate::dev tag: ${TAG} | sha: ${HEAD}"
70- {
71- echo "### PreProd candidate"
72- echo ""
73- echo "- dev tag: \`${TAG:-<none>}\`"
74- echo "- head sha: \`${HEAD:-<none>}\`"
75- } >> "$GITHUB_STEP_SUMMARY"
64+ - name : Debug event
65+ run : |
66+ echo "GITHUB_EVENT_NAME=${GITHUB_EVENT_NAME}"
67+ echo "Payload:" && cat "$GITHUB_EVENT_PATH" || true
7668
7769 - name : Resolve THIS vs LATEST TEST + stale guard (auto only)
7870 id : resolver
@@ -81,11 +73,10 @@ jobs:
8173 EVENT_NAME : ${{ github.event_name }}
8274 WORKFLOW_RUN_HEAD_SHA : ${{ github.event.workflow_run.head_sha }}
8375 MANUAL_REF : ${{ github.event.inputs.ref }}
84- ALLOW_OLDER : ${{ github.event.inputs.allow_older }}
8576 WORKFLOW_NAME : " 3. CD | Deploy to Test"
8677 BRANCH : " main"
8778 LIMIT : " 30"
88- run : python3 scripts/pre-release_resolver.py
79+ run : python3 scripts/workflow/ pre-release_resolver.py
8980
9081 - name : Resolve release_type (labels → default rc)
9182 id : release_type
9687 THIS_SHA : ${{ steps.resolver.outputs.this_sha }}
9788 LATEST_TEST_SHA : ${{ steps.resolver.outputs.latest_test_sha }}
9889 MANUAL_RELEASE_TYPE : ${{ github.event.inputs.release_type }}
99- run : python3 scripts/release_type_resolver.py
90+ run : python3 scripts/workflow/ release_type_resolver.py
10091
10192 deploy :
10293 name : " Call base-deploy.yml (PreProd)"
0 commit comments