mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-11 17:50:58 +00:00
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.
This commit is contained in:
parent
99d7ac2a9b
commit
78c4be4dc0
7 changed files with 34 additions and 2 deletions
10
act/runner/testdata/ensure-post-steps/action-composite/action.yml
vendored
Normal file
10
act/runner/testdata/ensure-post-steps/action-composite/action.yml
vendored
Normal file
|
@ -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
act/runner/testdata/ensure-post-steps/action-post/action.yml
vendored
Normal file
11
act/runner/testdata/ensure-post-steps/action-post/action.yml
vendored
Normal file
|
@ -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"
|
0
act/runner/testdata/ensure-post-steps/action-post/main.js
vendored
Normal file
0
act/runner/testdata/ensure-post-steps/action-post/main.js
vendored
Normal file
3
act/runner/testdata/ensure-post-steps/action-post/post.js
vendored
Normal file
3
act/runner/testdata/ensure-post-steps/action-post/post.js
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
if (process.env["INPUT_FAIL"] === "true") {
|
||||
process.exit(1);
|
||||
}
|
8
act/runner/testdata/ensure-post-steps/push.yml
vendored
Normal file
8
act/runner/testdata/ensure-post-steps/push.yml
vendored
Normal file
|
@ -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/
|
Loading…
Add table
Add a link
Reference in a new issue