mirror of
https://github.com/nektos/act.git
synced 2026-04-25 17:05:50 +03:00
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#2659
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/nektos/act/pull/6009
Author: @cobyfrombrooklyn-bot
Created: 2/24/2026
Status: 🔄 Open
Base:
master← Head:fix-issue-5976📝 Commits (1)
b2c8ca2fix: add job-index and job-total to strategy context📊 Changes
4 files changed (+34 additions, -0 deletions)
View changed files
📝
pkg/runner/expression.go(+4 -0)📝
pkg/runner/expression_test.go(+26 -0)📝
pkg/runner/run_context.go(+2 -0)📝
pkg/runner/runner.go(+2 -0)📄 Description
The
strategycontext was missingjob-indexandjob-totalattributes, which are documented in the GitHub Actions contexts reference. Workflows usingstrategy.job-indexorstrategy.job-totalwould get empty values.Changes
JobIndexandJobTotalfields toRunContextstructrunner.go(line 190:for i, matrix := range matrixes)job-indexandjob-totalin the strategy map in both expression evaluator paths inexpression.goTest
Added
TestStrategyJobIndexAndTotalinexpression_test.gothat:strategy.job-indexevaluates to 3strategy.job-totalevaluates to 5strategy.fail-fastandstrategy.max-parallelstill workTest fails without the fix (build error: RunContext has no field JobIndex/JobTotal), passes with it.
Tested locally on macOS ARM (Apple Silicon). All expression/unit tests pass. Pre-existing Docker-dependent test failures unrelated to this change.
Fixes #5976
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.