Skip to content

Add --no-compile flag to update and upgrade commands#19325

Merged
pelikhan merged 2 commits intomainfrom
copilot/add-cli-arg-disable-lock-modification
Mar 3, 2026
Merged

Add --no-compile flag to update and upgrade commands#19325
pelikhan merged 2 commits intomainfrom
copilot/add-cli-arg-disable-lock-modification

Conversation

Copy link
Contributor

Copilot AI commented Mar 3, 2026

Running update/upgrade in a GitHub Action can trigger PR protection rules because these commands regenerate .lock.yml files as part of their workflow. This adds a --no-compile flag to both commands to skip the compilation step, allowing the markdown sources and actions-lock.json to be updated without touching lock files.

Changes

  • update command: Added --no-compile flag; threads noCompile bool through RunUpdateWorkflowsUpdateWorkflowsupdateWorkflow, skipping compileWorkflowWithRefresh when set
  • upgrade command: Added --no-compile flag and NoCompile field to UpgradeConfig; connects to the pre-existing (but previously hardcoded-false) noCompile parameter in runUpgradeCommand, which now gates the compileAllWorkflowFiles call on !noFix && !noCompile
  • UpdateActionsInWorkflowFiles: Added noCompile bool parameter; skips per-file recompilation when set

Usage

# Update workflow sources without regenerating lock files
gh aw update --no-compile

# Upgrade (codemods + action pin updates) without regenerating lock files
gh aw upgrade --no-compile

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw git /usr/bin/git git rev-�� --show-toplevel resolved$ /usr/bin/git --show-toplevel git .cfg git (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --show-toplevel erignore /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/unpigz -json GO111MODULE 64/bin/go /usr/bin/unpigz (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha /tmp/gh-aw-test-runs/20260303-041731-33816/test-3766382470/.github/workflows rev-parse /usr/bin/git --show-toplevel /bin/sh /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha orts2420896463/001/main.md GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go l GOMOD GOMODCACHE go env -json GO111MODULE 1/x64/bin/node GOINSECURE GOMOD GOMODCACHE 1/x64/bin/node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel 64/pkg/tool/linurev-parse /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel go /usr/bin/git git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha INVALID,NEW -j DROP GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --git-dir sh /usr/bin/git npx prettier --cgit GOPROXY 64/bin/go git rev-�� --git-dir sh /opt/hostedtoolcache/node/24.13.1/x64/bin/node "prettier" --chegit sh 64/bin/go /opt/hostedtoolcache/node/24.13.1/x64/bin/node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE 64/pkg/tool/linu--show-toplevel git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha list --json /usr/bin/infocmp --repo owner/repo 64/bin/go infocmp -1 xterm-color go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet ck 'scripts/**/*git GO111MODULE 64/bin/go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel GOPROXY /usr/bin/git GOSUMDB GOWORK 64/bin/go git init�� GOMODCACHE (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/git 2370062031/custogit GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go k/gh�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD erignore go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha ck '**/*.cjs' '*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD ode-gyp-bin/node-json ache/go/1.25.0/xGO111MODULE env 1098200/b375/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -c=4 -nolocalimports -importcfg /tmp/go-build2814922063/b391/importcfg -pack /home/REDACTED/work/gh-aw/gh-aw/pkg/constants/constants.go /home/REDACTED/work/gh-aw/gh-aw/pkg/constants/constants_test.go env 1098200/b399/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE b/gh-aw/pkg/math-o GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha list --json /usr/bin/git --repo owner/repo 64/bin/go git rev-�� --show-toplevel go /usr/bin/infocmp ck 'scripts/**/*git GO111MODULE 64/bin/go infocmp (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha -v git /usr/bin/git --show-toplevel go /usr/bin/git git rev-�� --show-toplevel git /usr/bin/gh --show-toplevel go /usr/bin/gh gh (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha xterm-color GOPROXY /usr/bin/git GOSUMDB GOWORK 64/bin/go /usr/bin/git conf�� --get-regexp ^remote\..*\.gh-resolved$ ache/node/24.13.1/x64/bin/node ck 'scripts/**/*git GO111MODULE 64/bin/go ache/node/24.13.1/x64/bin/node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha --get-regexp ^remote\..*\.gh-resolved$ /usr/bin/git --show-toplevel s98SOCpl_QrR0/XHrev-parse /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel go /usr/bin/gh git (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha /existing.md GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env -json .cfg /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha /tmp/gh-aw-test-test-logs/run-12345 config (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 R_UliyopLjxfi/ZevTDm5WWeLBmz850apU/LCdcE90MYeg_f3TBb3HV/wjRJCy6Rtest@example.com /usr/bin/git k/gh-aw/gh-aw/.ggit GO111MODULE ache/node/24.13./tmp/gh-aw-test-runs/20260303-041418-32676/test-1988692753 git rev-�� --show-toplevel go /usr/bin/git sistency_GoAndJagit GO111MODULE clusion,workflow--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 git /usr/bin/git --show-toplevel owner /usr/bin/git git rev-�� --show-toplevel l /opt/pipx_bin/bash --show-toplevel go /usr/bin/git bash (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go estl�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 go /usr/bin/git runs/20260303-04git GO111MODULE 1/x64/bin/node git rev-�� --show-toplevel go x_amd64/vet ithub/workflows/git GO111MODULE /opt/hostedtoolc--show-toplevel x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 git /usr/bin/git l go /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel go /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 GO111MODULE x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE Bl/-XuBet3ZfD2Ea9eP_j0j/Pf2At6e0GLw7yYfjbhtb (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 go /usr/bin/git ithub-script/gitgit GO111MODULE 1/x64/bin/node git rev-�� --show-toplevel go /usr/bin/git ithub/workflows/git GO111MODULE /opt/hostedtoolc--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 git /usr/bin/git --show-toplevel x_amd64/vet /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel go -d git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 GO111MODULE x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE Xe/zd3aBy0104K8ZfExHKi7/u8U4vpCVJ6IIRF6zALNG (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 go /usr/bin/git 0apU/ZevTDm5WWeLgit GO111MODULE ache/node/24.13.--show-toplevel git rev-�� --show-toplevel go (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 go /usr/bin/git -json GO111MODULE /opt/hostedtoolc.github/workflows/test.md git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 git /usr/bin/git --show-toplevel owner /usr/bin/git git rev-�� --show-toplevel l /home/REDACTED/.config/composer/vendor/bin/bash --show-toplevel go /usr/bin/git bash (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env ty-test.md GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 go /usr/bin/git k/gh-aw/gh-aw/.ggit GO111MODULE (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 git /usr/bin/git --show-toplevel conntrack /usr/bin/git git rev-�� --show-toplevel git /usr/local/.ghcup/bin/bash --show-toplevel go /usr/bin/git bash (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 GO111MODULE x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE Zm/GFtmVa307QDDNuUCuh0B/7zrZo2ypVmaEewr479zV (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 go /usr/bin/git k/gh-aw/gh-aw/.ggit GO111MODULE 1/x64/bin/node git rev-�� --show-toplevel 1/x64/bin/node /usr/bin/git -json GO111MODULE /tmp/go-build281--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 l /usr/bin/git --show-toplevel conntrack /usr/bin/git git rev-�� --show-toplevel git /home/REDACTED/.dotnet/tools/bash --show-toplevel go /usr/bin/git bash (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go env ck 'scripts/**/*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 -pack /home/REDACTED/work/gh-aw/gh-aw/pkg/sliceutil/sliceutil.go /home/REDACTED/work/gh-aw/gh-aw/pkg/sliceutil/sliceutil_test.go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha -dirty" -o gh-aw ./cmd/gh-aw GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha --show-toplevel /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet /usr/bin/git /v1.0.0 -buildtags /usr/bin/infocmpxterm-color git rev-�� --show-toplevel infocmp /usr/bin/git xterm-color (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env 3402357070/.github/workflows GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha heckout/git/ref/tags/v5 /usr/bin/git /usr/bin/git -v GOPROXY /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git /home/REDACTED/wor/usr/bin/git rev-parse ache/node/24.13.-v git (http block)
  • https://api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion g/timeutil/formagit g/timeutil/formarev-parse 1/x64/bin/node git rev-�� --show-toplevel 1/x64/bin/node /usr/bin/git 4922063/b424/tesgit GOPROXY 4922063/b424/imp--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion --show-toplevel go /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel go /usr/bin/git git (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOINSECURE GOMOD GOMODCACHE go env ck 'scripts/**/*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo /usr/bin/git -json GO111MODULE ache/go/1.25.0/x--show-toplevel git rev-�� --show-toplevel go /usr/bin/git st-1739009686/.ggit GO111MODULE .cfg git (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/node (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build2814922063/b383/cli.test /tmp/go-build2814922063/b383/cli.test -test.testlogfile=/tmp/go-build2814922063/b383/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE ortcfg env g/styles/theme.gGOINSECURE g/styles/theme_tGOMOD 64/bin/go GOINSECURE erignore GOMODCACHE ache/go/1.25.0/xGO111MODULE (http block)
    • Triggering command: /tmp/go-build2996437263/b383/cli.test /tmp/go-build2996437263/b383/cli.test -test.testlogfile=/tmp/go-build2996437263/b383/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true 52/001/test-frongit GO111MODULE ache/go/1.25.0/x--show-toplevel git rev-�� heckout/git/ref/tags/v3 go /usr/bin/git 01/main.md GO111MODULE ache/go/1.25.0/x--show-toplevel git (http block)
    • Triggering command: /tmp/go-build2307808637/b367/cli.test /tmp/go-build2307808637/b367/cli.test -test.testlogfile=/tmp/go-build2307808637/b367/testlog.txt -test.paniconexit0 -test.timeout=1m0s rev-�� --show-toplevel 4922063/b401/importcfg x_amd64/vet | tr '\n' ':')$git k/gh-aw/gh-aw/pkrev-parse /usr/bin/infocmp--git-dir x_amd64/vet atur�� --show-toplevel infocmp /usr/bin/git xterm-color GOPROXY /usr/bin/git git (http block)
  • https://api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go ache�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name --show-toplevel x_amd64/link /usr/bin/git -json GO111MODULE ache/go/1.25.0/x--show-toplevel git rev-�� --show-toplevel GT/jqXiqKS2mm7rG7KRlb0f/T36gUPQZTest User /usr/bin/git -json GO111MODULE .cfg git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name --show-toplevel go /usr/bin/git -json GO111MODULE /opt/hostedtoolc--git-dir git rev-�� --show-toplevel /systemd-executor /usr/bin/git /tmp/go-build281gh -importcfg /usr/bin/git git (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Review update and upgrade cli commands and make sure there is a cli arg to disable the modification of lock.yml files. This is useful to run update/upgrade in an action and avoid triggering the github action pull request protection.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…e modification

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Review update and upgrade CLI commands for lock modifications Add --no-compile flag to update and upgrade commands Mar 3, 2026
@pelikhan pelikhan marked this pull request as ready for review March 3, 2026 04:23
Copilot AI review requested due to automatic review settings March 3, 2026 04:23
@pelikhan pelikhan merged commit f76019f into main Mar 3, 2026
106 checks passed
@pelikhan pelikhan deleted the copilot/add-cli-arg-disable-lock-modification branch March 3, 2026 04:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a --no-compile flag to the update and upgrade commands so users (notably in GitHub Actions) can update workflow markdown sources and actions-lock.json without regenerating .lock.yml files.

Changes:

  • Add --no-compile to update, threading noCompile through RunUpdateWorkflowsUpdateWorkflowsupdateWorkflow and into UpdateActionsInWorkflowFiles to skip recompilation.
  • Add --no-compile to upgrade, gating the “compile all workflows” step on !noFix && !noCompile.
  • Adjust tests that call RunUpdateWorkflows for the updated function signature.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pkg/cli/upgrade_command.go Adds --no-compile flag and uses it to skip the compilation step in upgrade.
pkg/cli/update_command.go Adds --no-compile flag and threads it through the update pipeline.
pkg/cli/update_workflows.go Adds noCompile plumbing and skips per-workflow compilation when set.
pkg/cli/update_actions.go Adds noCompile parameter and skips recompilation after action-ref updates when set.
pkg/cli/update_command_test.go Updates RunUpdateWorkflows calls to include the new parameter.
Comments suppressed due to low confidence (1)

pkg/cli/upgrade_command.go:95

  • When --create-pull-request is used with --no-compile (or --no-fix), the PR body text later in this function still says workflows were recompiled. Consider tailoring prBody to match the actual flags used so the generated PR description is accurate.
				}
			}

			if err := runUpgradeCommand(verbose, dir, noFix, noCompile, noActions); err != nil {
				return err
			}


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +531 to +535
// Recompile the updated workflow (unless --no-compile is set)
if !noCompile {
if err := compileWorkflowWithRefresh(path, verbose, false, engineOverride, false); err != nil {
if verbose {
fmt.Fprintln(os.Stderr, console.FormatWarningMessage(fmt.Sprintf("Failed to recompile %s: %v", path, err)))
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UpdateActionsInWorkflowFiles now has a noCompile path that skips the recompilation step, but there are no tests covering that behavior. Since compilation generates .lock.yml files, consider adding a test that asserts no lock file is created (and/or compilation isn't attempted) when noCompile=true.

Copilot uses AI. Check for mistakes.
Comment on lines 59 to 64
Examples:
` + string(constants.CLIExtensionPrefix) + ` upgrade # Upgrade all workflows
` + string(constants.CLIExtensionPrefix) + ` upgrade --no-fix # Update agent files only (skip codemods, actions, and compilation)
` + string(constants.CLIExtensionPrefix) + ` upgrade --no-actions # Skip updating GitHub Actions versions
` + string(constants.CLIExtensionPrefix) + ` upgrade --no-compile # Skip recompiling workflows (do not modify lock files)
` + string(constants.CLIExtensionPrefix) + ` upgrade --create-pull-request # Upgrade and open a pull request
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The help text above still describes compilation as an unconditional part of upgrade (e.g., the step list / guarantees), but --no-compile now makes compilation optional. Please update the surrounding long description so users don’t get conflicting guidance about whether lock files will be regenerated.

This issue also appears on line 89 of the same file.

Copilot uses AI. Check for mistakes.
Comment on lines 110 to +112
// RunUpdateWorkflows updates workflows from their source repositories.
// Each workflow is compiled immediately after update.
func RunUpdateWorkflows(workflowNames []string, allowMajor, force, verbose bool, engineOverride string, workflowsDir string, noStopAfter bool, stopAfter string, noMerge bool, disableReleaseBump bool) error {
updateLog.Printf("Starting update process: workflows=%v, allowMajor=%v, force=%v, noMerge=%v, disableReleaseBump=%v", workflowNames, allowMajor, force, noMerge, disableReleaseBump)
func RunUpdateWorkflows(workflowNames []string, allowMajor, force, verbose bool, engineOverride string, workflowsDir string, noStopAfter bool, stopAfter string, noMerge bool, disableReleaseBump bool, noCompile bool) error {
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function doc comment says each workflow is compiled immediately after update, but this is no longer true when --no-compile is passed through (noCompile skips compilation). Please update this comment (and any related help text in this file) to reflect that compilation is conditional.

Copilot uses AI. Check for mistakes.
Comment on lines 481 to 483
// major version. Updated files are recompiled. By default all actions are updated to
// the latest major version; pass disableReleaseBump=true to only update core
// (actions/*) references.
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doc comment still states "Updated files are recompiled", but compilation is now optional via the noCompile parameter. Please adjust the comment to reflect that recompilation is skipped when --no-compile is set.

Suggested change
// major version. Updated files are recompiled. By default all actions are updated to
// the latest major version; pass disableReleaseBump=true to only update core
// (actions/*) references.
// major version. By default, updated files are recompiled unless --no-compile is set.
// By default all actions are updated to the latest major version; pass
// disableReleaseBump=true to only update core (actions/*) references.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants