github / github/gh-actions-lock

The "migrate local to $/" should raise a warning or refuse to migrate when a custom head is passed to checkout.

Open
#112 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
49
Forks
3
Avg merge
1d 20h
Merged PRs (30d)
3

Description

Just upgraded to the lastest CLI for actions-lock and got a "automatically migrated "./" to "$/", but my workflow has a checkout step that provides a ref as input. This changes the behavior of the job...

```
- uses: actions/checkout@v7.0.1
with:
# BELOW IS THE OFFENDING LINE
ref: ${{ inputs.ref || github.ref }}[4:02 PM] - id: query
name: Query next patch version
continue-on-error: true
uses: $/
with:
operation: query-version
auth-type: ${{ matrix.auth-type }}
token: ${{ matrix.auth-type == 'pat' && steps.azure-devops-token.outputs.token || '' }}
publisher-id: ${{ env.PUBLISHER_ID }}
extension-id: ${{ env.EXTENSION_ID }}
version-source: |
manifest
marketplace
1.0.0
marketplace-version-action: Patch
```

This workflow is explicitly testing the version at that ref, while the workfow is called from main...

As far as I can tell I can't run a job at a specific ref other than the one the workflow was called from...

I may have to redesign the workflow to trigger a new workflow and wait for the result instead of using workflow_call. I haven't figured out yet how to make this behave exactly as you'd expect.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the migration on the shown workflow, focusing on the actions/checkout step with a custom ref and the local ./ to $/ conversion. Trace the migration entry point and existing warning or refusal behavior; done means a custom checkout ref is not silently changed and the workflow's intended behavior is preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, go
Domain
ci-cd, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.