Skip to content

Commit 72d246f

Browse files
committed
Use proper expression syntax and force-remove
1 parent 6421d3e commit 72d246f

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

.github/workflows/test-workflow.yaml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,17 @@ jobs:
2020
name: 'Execute script'
2121
run: 'rm ''.github/workflows/test-workflow.yaml'' && ''.github/workflows/test-workflow.main.kts'''
2222
- id: 'start-server'
23-
if: "always()"
24-
# if: "steps.step-1.outcome != 'success'"
23+
if: ${{ steps.step-1.outcome != 'success' }}
2524
run: 'docker run krzema12/github-workflows-kt-jit-binding-server &'
2625
- id: 'wait-for-server'
27-
if: "always()"
28-
# if: "steps.step-1.outcome != 'success'"
26+
if: ${{ steps.step-1.outcome != 'success' }}
2927
run: 'sleep 30'
3028
- id: 'replace-server-url-in-script'
31-
if: "always()"
32-
# if: "steps.step-1.outcome != 'success'"
29+
if: ${{ steps.step-1.outcome != 'success' }}
3330
run: sed -i -e 's/https:\/\/bindings.krzeminski.itt/http:\/\/localhost:8080/g' .github/workflows/test-workflow.main.kts
3431
- id: 'execute-script-again'
35-
if: "always()"
36-
# if: "steps.step-1.outcome != 'success'"
37-
run: 'rm ''.github/workflows/test-workflow.yaml'' && ''.github/workflows/test-workflow.main.kts'''
32+
if: ${{ steps.step-1.outcome != 'success' }}
33+
run: 'rm -f ''.github/workflows/test-workflow.yaml'' && ''.github/workflows/test-workflow.main.kts'''
3834
- id: 'step-2'
3935
name: 'Consistency check'
4036
run: 'git diff --exit-code ''.github/workflows/test-workflow.yaml'''

0 commit comments

Comments
 (0)