-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ensure all post steps are executed (#1286)
This fixes an issue in the chain of post steps introduced while updating the step-logger for composite actions. It includes a test case so we make sure this does not happen again.
- Loading branch information
1 parent
9d76bac
commit 3364f95
Showing
7 changed files
with
34 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
pkg/runner/testdata/ensure-post-steps/action-composite/action.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: "action composite" | ||
description: "action composite" | ||
runs: | ||
using: composite | ||
steps: | ||
# second post action should fail if executed (we do check on the exit code) | ||
- uses: ./ensure-post-steps/action-post/ | ||
with: | ||
fail: "true" | ||
- uses: ./ensure-post-steps/action-post/ |
11 changes: 11 additions & 0 deletions
11
pkg/runner/testdata/ensure-post-steps/action-post/action.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: "action post" | ||
description: "action post" | ||
inputs: | ||
fail: | ||
description: "true if this should fail" | ||
required: false | ||
default: "false" | ||
runs: | ||
using: node16 | ||
main: "./main.js" | ||
post: "./post.js" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
if (process.env["INPUT_FAIL"] === "true") { | ||
process.exit(1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name: test | ||
on: push | ||
jobs: | ||
second-post-step-should-fail: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./ensure-post-steps/action-composite/ |