Skip to content

Pass github context to the logic step #7

Pass github context to the logic step

Pass github context to the logic step #7

Workflow file for this run

# This file was generated using Kotlin DSL (.github/workflows/test-workflow.main.kts).
# If you want to modify the workflow, please change the Kotlin file and regenerate this YAML file.
# Generated with https://github.com/typesafegithub/github-workflows-kt
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'
env:
GHWKT_GITHUB_CONTEXT_JSON: '${{ toJSON(github) }}'
run: |-
echo $GHWKT_GITHUB_CONTEXT_JSON > github-context.json
GHWKT_RUN_STEP='test-job:step-1' '.github/workflows/test-workflow.main.kts'