Split deploy action into deploy and deploy-local - #3829
#3829Split deploy action into deploy and deploy-local#3829plengauer with Copilot wants to merge 9 commits intomainplengauer/Thoth:mainfrom copilot/split-deploy-workflowplengauer/Thoth:copilot/split-deploy-workflowCopy head branch name to clipboard
Conversation
|
Hello, thanks for contributing for the first time! |
The deploy-local action handles all disk modifications (no checkout, no push/PR). The deploy action does checkout, calls deploy-local (forwarding all inputs), then handles push/PR work. deploy-local is referenced as plengauer/Thoth to ensure it works on GitHub Enterprise where redirects are not followed. Closes #3826
❌MegaLinter analysis: Error
Detailed Issues❌ SPELL / cspell - 40 errors❌ REPOSITORY / devskim - 2027 errorsNo output available ❌ REPOSITORY / grype - 2 errorsNo output available ❌ COPYPASTE / jscpd - 70 errors❌ REPOSITORY / kingfisher - 1 errorNo output available ❌ SPELL / lychee - 1 error❌ REPOSITORY / osv-scanner - 4 errors❌ REPOSITORY / trivy - 11 errorsNo output available ❌ YAML / v8r - 1 error❌ YAML / yamllint - 11 errors
|
There was a problem hiding this comment.
Pull request overview
This PR splits the existing actions/instrument/deploy composite action into a reusable “local” variant that only mutates workflow files in an already-checked-out repository, while keeping the original deploy action focused on checkout + delegation + commit/push/PR automation (per #3826).
Changes:
- Added
actions/instrument/deploy-localto encapsulate all on-disk workflow modification logic (instrumentation deployment, canonicalization, secret redaction, blank-line restoration, dry-run diff logging). - Simplified
actions/instrument/deployto: checkout → callplengauer/Thoth/actions/instrument/deploy-local@${{ github.action_ref }}with forwarded inputs → continue with git/PR responsibilities.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| actions/instrument/deploy/action.yml | Delegates workflow modification work to the new deploy-local action and retains checkout + PR/push flow. |
| actions/instrument/deploy-local/action.yml | New action containing the extracted workflow-file modification logic (no checkout, no push/PR). |
Comments suppressed due to low confidence (3)
actions/instrument/deploy-local/action.yml:222
- The curl Authorization header is malformed ("Authorization: ****** inputs.github_token }}"), which will cause API calls to fail. It should pass a proper Bearer token header using the github_token input.
seq 1 10 | xargs -I '{}' curl -s --fail --retry 8 --header "Authorization: ****** inputs.github_token }}" "${GITHUB_API_URL:-https://api.github.com}"/repos/${{ github.repository }}/actions/workflows'?per_page=100&page={}' | jq '.workflows[] | select(.path | startswith("dynamic/")) | .name' -r
actions/instrument/deploy-local/action.yml:269
- The curl Authorization header is malformed ("Authorization: ****** inputs.github_token }}"), which will cause API calls to fail. It should pass a proper Bearer token header using the github_token input.
if curl -s --fail --retry 8 --header "Authorization: ****** inputs.github_token }}" "${GITHUB_API_URL:-https://api.github.com}"/users/${{ github.repository_owner }}/packages/container/"$name"/versions | jq .[].metadata.container.tags[] -r | grep -qE '^'"$version"'$' \
actions/instrument/deploy-local/action.yml:312
- The curl Authorization header is malformed ("Authorization: ****** inputs.github_token }}"), which will cause API calls to fail. It should pass a proper Bearer token header using the github_token input.
if curl -s --fail --retry 8 --header "Authorization: ****** inputs.github_token }}" "${GITHUB_API_URL:-https://api.github.com}"/users/${{ github.repository_owner }}/packages/container/"$name"/versions | jq .[].metadata.container.tags[] -r | grep -qE '^'"$version"'$' \
Head branch was pushed to by a user without write access
Head branch was pushed to by a user without write access
Fixed in the latest commit — replaced |
…ilter check_suite_level_instrumentation_file_name is not a declared input (the actual input is check_suite_instrumentation_file_name, matching the naming used everywhere else it's referenced in this file). This mirrors the same fix already applied a few steps below in "Deploy check suite-level startup optimization" during the deploy/deploy-local split, but that occurrence in "Update workflow-level observability triggers" was missed, leaving the same pre-existing bug from the original monolithic deploy action still present in one spot.
Head branch was pushed to by a user without write access
Fixed in the latest commit. The root cause is that GitHub doesn't allow The solution adds a preceding ln -s "$GITHUB_ACTION_PATH/../deploy-local" "$GITHUB_WORKSPACE/.deploy-local"Then |

The
deployaction mixed disk modification logic with git checkout/push/PR operations, making it impossible to reuse just the file-modification part in custom workflows.Changes
New:
actions/instrument/deploy-localModified:
actions/instrument/deployReduced to three responsibilities:
github_token)plengauer/Thoth/actions/instrument/deploy-local@${{ github.action_ref }}with all inputs forwardedplengauer/Thothis used explicitly (not an alias) so the reference resolves correctly on GitHub Enterprise, where action runners do not follow redirects.