[PR #1497] [MERGED] feat: Support "result" on "needs" context. #1969

Closed
opened 2026-03-01 21:53:28 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/1497
Author: @aholmes
Created: 12/9/2022
Status: Merged
Merged: 12/19/2022
Merged by: @mergify[bot]

Base: masterHead: aholmes-add-results-to-needs


📝 Commits (9)

  • bbe2692 Support "result" on "needs" context.
  • 09da3b9 Change Needs to use a new struct rather than the open type interface{}.
  • a3bb828 Merge branch 'master' into aholmes-add-results-to-needs
  • 2839837 Add integration test to "needs" context change.
  • 13e3fb7 feat: allow to spawn and run a local reusable workflow (#1423)
  • b370464 refactor: fix savestate in pre steps (#1466)
  • 2dc4caa fix: tail (not absolute) as entrypoint of job container (#1506)
  • 917dda4 Fix conflict in merge.
  • 8acbb91 Merge branch 'master' into aholmes-add-results-to-needs

📊 Changes

5 files changed (+34 additions, -9 deletions)

View changed files

📝 pkg/exprparser/interpreter.go (+6 -1)
📝 pkg/exprparser/interpreter_test.go (+4 -2)
📝 pkg/runner/expression.go (+8 -6)
📝 pkg/runner/runner_test.go (+1 -0)
pkg/runner/testdata/job-needs-context-contains-result/push.yml (+15 -0)

📄 Description

This change adds "result" to a job's "needs" context, as documented here. act currently tracks the success/failure/cancelled status of a job, but does not include this value the needs context.

Fixes #1367


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nektos/act/pull/1497 **Author:** [@aholmes](https://github.com/aholmes) **Created:** 12/9/2022 **Status:** ✅ Merged **Merged:** 12/19/2022 **Merged by:** [@mergify[bot]](https://github.com/apps/mergify) **Base:** `master` ← **Head:** `aholmes-add-results-to-needs` --- ### 📝 Commits (9) - [`bbe2692`](https://github.com/nektos/act/commit/bbe2692011f91326a274e9f0af26bd8f45b58d7b) Support "result" on "needs" context. - [`09da3b9`](https://github.com/nektos/act/commit/09da3b9dece66323c4bdf7b5f523e8bb0fcf6696) Change `Needs` to use a new struct rather than the open type `interface{}`. - [`a3bb828`](https://github.com/nektos/act/commit/a3bb82842a1aaf44c127ec8dffd4682ce0a904c1) Merge branch 'master' into aholmes-add-results-to-needs - [`2839837`](https://github.com/nektos/act/commit/2839837e1ee1122adb008986399cb5c60b838a58) Add integration test to "needs" context change. - [`13e3fb7`](https://github.com/nektos/act/commit/13e3fb7881abb456dcf639b416ad709a728dcaf2) feat: allow to spawn and run a local reusable workflow (#1423) - [`b370464`](https://github.com/nektos/act/commit/b3704641a9c994f3bee2f886ccb14cee655d71e1) refactor: fix savestate in pre steps (#1466) - [`2dc4caa`](https://github.com/nektos/act/commit/2dc4caaa29b39788f450edeefe76bdcd5eca8b08) fix: tail (not absolute) as entrypoint of job container (#1506) - [`917dda4`](https://github.com/nektos/act/commit/917dda4d13c4b755cb16a571a974641762579d80) Fix conflict in merge. - [`8acbb91`](https://github.com/nektos/act/commit/8acbb91bbcd6b0fa1bb93b51f407faa2a2be339f) Merge branch 'master' into aholmes-add-results-to-needs ### 📊 Changes **5 files changed** (+34 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `pkg/exprparser/interpreter.go` (+6 -1) 📝 `pkg/exprparser/interpreter_test.go` (+4 -2) 📝 `pkg/runner/expression.go` (+8 -6) 📝 `pkg/runner/runner_test.go` (+1 -0) ➕ `pkg/runner/testdata/job-needs-context-contains-result/push.yml` (+15 -0) </details> ### 📄 Description This change adds "result" to a job's "needs" context, as documented [here](https://docs.github.com/en/actions/learn-github-actions/contexts#needs-context). `act` currently tracks the success/failure/cancelled status of a job, but does not include this value the `needs` context. Fixes #1367 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:53:28 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#1969
No description provided.