mirror of
https://gitea.com/gitea/act_runner.git
synced 2026-03-22 06:45:03 +01:00
fix: anchor cyclic detection (#30)
Closes #25 Reviewed-on: https://gitea.com/actions-oss/act-cli/pulls/30 Co-authored-by: Christopher Homberger <christopher.homberger@web.de> Co-committed-by: Christopher Homberger <christopher.homberger@web.de>
This commit is contained in:
committed by
ChristopherHX
parent
13e0654fd7
commit
6c827eba95
@@ -614,17 +614,21 @@ jobs:
|
||||
|
||||
func TestReadWorkflow_Anchor(t *testing.T) {
|
||||
yaml := `
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: &runner ubuntu-latest
|
||||
steps:
|
||||
- uses: &checkout actions/checkout@v5
|
||||
test2:
|
||||
test2: &job
|
||||
runs-on: *runner
|
||||
steps:
|
||||
- uses: *checkout
|
||||
- run: echo $TRIGGER
|
||||
env:
|
||||
TRIGGER: &trigger push
|
||||
test3: *job
|
||||
on: push #*trigger
|
||||
`
|
||||
|
||||
w, err := ReadWorkflow(strings.NewReader(yaml), false)
|
||||
|
||||
Reference in New Issue
Block a user