Support for basic statically resolvable expressions in `container` field
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start by tracing how gh actions-lock --verify reads the workflow container field and reports expressions it cannot resolve; the payload names no source files or tests. Check how matrix values are represented and whether statically defined include entries can supply container values. Done means verification can resolve these static matrix expressions while still warning about values chosen at runtime.
Written by the indexing model from the issue text.
Description
Hi! When running gh actions-lock --verify , I get the warning below.
! container image `${{ matrix.container }}` is chosen at runtime, so the lockfile can't check it
↳ used by .github/workflows/build-ifcopenshell-linux.yml: job build container
↳ use a literal image pinned by digest where possible, or pin each value of the matrix or input by digest
Though this is mentioned in limitations in readme (This includes images chosen by a ${{ }} expression), is there any chance container can support resolving expressions that refer to static matrices?
In my case matrix is fully defined statically, so it's possible to infer the container value.
Otherwise to resolve this warning I need to drop matrices completely for such cases and instead split action in 2 jobs - either by moving the entire job code to a composite action or by using YAML anchors (e.g. steps: &build-steps in one job and steps: *build-steps in another).
Both result in less idiomatically written actions.
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- arch_suffix: linux64
runner: ubuntu-22.04
container:
image: rockylinux:9@sha256:…
- arch_suffix: linuxarm64
runner: ubuntu-22.04-arm
container:
image: rockylinux/rockylinux:10@sha256:…
env:
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
name: build (${{ matrix.arch_suffix }})
runs-on: ${{ matrix.runner }}
container: ${{ matrix.container }}
- 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 3/5 1-2 days Newbie friendliness 52/100
github/gh-actions-lock#252 ·
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
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
-
Difficulty 1/5 Under an hour Newbie friendliness 84/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