Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/regenerate-yarn-lock.main.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env kotlin
@file:Repository("https://repo1.maven.org/maven2/")
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.7.0")

@file:Repository("https://bindings.krzeminski.it")
@file:DependsOn("actions:checkout:v6")

import io.github.typesafegithub.workflows.domain.RunnerType
import io.github.typesafegithub.workflows.domain.triggers.IssueComment
import io.github.typesafegithub.workflows.dsl.expressions.expr
import io.github.typesafegithub.workflows.dsl.workflow
import io.github.typesafegithub.workflows.yaml.CheckoutActionVersionSource
import io.github.typesafegithub.workflows.yaml.DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG

workflow(
name = "Build",
on = listOf(
IssueComment()
),
consistencyCheckJobConfig = DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG.copy(
checkoutActionVersion = CheckoutActionVersionSource.InferFromClasspath(),
),
sourceFile = __FILE__,
) {
job(
id = "regenerate-yarn-lock",
runsOn = RunnerType.UbuntuLatest,
`if` = expr("!github.event.issue.pull_request")
) {
run(
name = "Run command",
command = "echo ${expr("github.event.issue_comment")}",
)
}
}
30 changes: 30 additions & 0 deletions .github/workflows/regenerate-yarn-lock.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file was generated using Kotlin DSL (.github/workflows/regenerate-yarn-lock.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:
issue_comment: {}
jobs:
check_yaml_consistency:
name: 'Check YAML consistency'
runs-on: 'ubuntu-latest'
steps:
- id: 'step-0'
name: 'Check out'
uses: 'actions/checkout@v6'
- id: 'step-1'
name: 'Execute script'
run: 'rm ''.github/workflows/regenerate-yarn-lock.yaml'' && ''.github/workflows/regenerate-yarn-lock.main.kts'''
- id: 'step-2'
name: 'Consistency check'
run: 'git diff --exit-code ''.github/workflows/regenerate-yarn-lock.yaml'''
regenerate-yarn-lock:
runs-on: 'ubuntu-latest'
needs:
- 'check_yaml_consistency'
if: '${{ !github.event.issue.pull_request }}'
steps:
- id: 'step-0'
name: 'Run command'
run: 'echo ${{ github.event.issue_comment }}'
Loading