Skip to content

Commit

Permalink
Try with heredoc
Browse files Browse the repository at this point in the history
  • Loading branch information
krzema12 authored Apr 22, 2024
1 parent 92dfb4a commit e288256
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions .github/workflows/test-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,16 @@ name: 'Build'
on:
push: {}
jobs:
check_yaml_consistency:
name: 'Check YAML consistency'
runs-on: 'ubuntu-latest'
steps:
- id: 'step-0'
name: 'Check out'
uses: 'actions/checkout@v4'
- id: 'step-1'
name: 'Execute script'
run: 'rm ''.github/workflows/test-workflow.yaml'' && ''.github/workflows/test-workflow.main.kts'''
- id: 'step-2'
name: 'Consistency check'
run: 'git diff --exit-code ''.github/workflows/test-workflow.yaml'''
test-job:
runs-on: 'ubuntu-latest'
needs:
- 'check_yaml_consistency'
steps:
- id: 'step-0'
uses: 'actions/checkout@v4'
- id: 'step-1'
name: 'Step with Kotlin logic'
run: |-
CONTEXT_DUMPS_DIR=$(mktemp -d)
echo '${{ toJSON(github) }}' > "$CONTEXT_DUMPS_DIR/github.json"
cat >"$CONTEXT_DUMPS_DIR/github.json" <<EOL
${{ toJSON(github) }}
EOL
GHWKT_RUN_STEP='test-job:step-1' CONTEXT_DUMPS_DIR=$CONTEXT_DUMPS_DIR '.github/workflows/test-workflow.main.kts'

0 comments on commit e288256

Please sign in to comment.