Feature request: Add support for locking actions that use YAML anchors
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
Research direction
The payload names no source files, so start by finding where the tool reads uses: values from workflow YAML and how it parses those documents. Reproduce with the anchored Checkout example in the issue and see whether the anchor-aliased uses: line is skipped. Done means the aliased step is detected and locked, and the expected output in the issue is confirmed with the maintainers first, since it replaces the commit SHA with a tag.
Written by the indexing model from the issue text.
Description
Current versions of actions-lock (as of v0.4.0) fail to detect and lock actions that use YAML anchors in the uses: field.
For example, the following configuration containing YAML anchors remains unhandled:
# `gh actions-lock` does not handle `uses:` that use YAML anchors
- name: Checkout
uses: &checkout-uses actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with: &checkout-with
token: ...
persist-credentials: ...
# Run the same action again using the same version and the same parameters
- name: Checkout again
uses: *checkout-uses
with: *checkout-with
Proposed Feature
Implementation of YAML anchor parsing enables actions-lock to correctly detect and process these actions as lock targets.
The expected behavior involves processing such configurations as follows:
- name: Checkout
- uses: &checkout-uses actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ uses: &checkout-uses actions/[email protected]
with: &checkout-with
token: ...
persist-credentials: ...
- name: Checkout again
uses: *checkout-uses
with: *checkout-with
- Dominant language
- Go
- Stars
- 253
- Forks
- 15
- Avg merge
- 19h 30m
- Merged PRs (30d)
- 60
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/gh-actions-lock
-
Fix mode unpins a reusable workflow call when the same repository is also used as a step actionOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
github/gh-actions-lock#261 ·
Maintainers usually reply within 1 day
-
Dependabot drops an unchanged transitive dependency when bumping a composite actionPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 30/100
github/gh-actions-lock#257 · 1 comment ·
Maintainers usually reply within 1 day
-
--migrate-local-actions rewrites action files in nested worktrees and submodulesPossibly taken @aksestok claimed this 1 day ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 20/100
github/gh-actions-lock#253 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
github/gh-actions-lock#247 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
github/gh-actions-lock#246 · 1 reaction ·
Maintainers usually reply within 1 day
All issues in github/gh-actions-lock
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
cmd/ebitenmobile: multi-language bindings run the complete generator twicePossibly taken @kumagi claimed this today. Openos:macos performance
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
hajimehoshi/ebiten#4011 · 1 comment ·
Maintainers usually reply within 1 day
-
agent-butler-finding chore
Difficulty 1/5 Under an hour Newbie friendliness 78/100
jordansmall/spindrift#6318 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Eyevinn/moqlivemock#166 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
JakeChampion/lang#14091 ·
Maintainers usually reply within 1 day