-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add stub of workflow for checking the state of upstream project (#261)
Part of #260. Adding such simple workflow to be able to run it through the UI, and further iterate on it.
- Loading branch information
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env kotlin | ||
@file:Repository("https://repo1.maven.org/maven2/") | ||
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.0.1") | ||
|
||
@file:Repository("https://bindings.krzeminski.it/") | ||
@file:DependsOn("actions:checkout:v4") | ||
|
||
import io.github.typesafegithub.workflows.actions.actions.Checkout | ||
import io.github.typesafegithub.workflows.domain.RunnerType | ||
import io.github.typesafegithub.workflows.domain.triggers.WorkflowDispatch | ||
import io.github.typesafegithub.workflows.dsl.workflow | ||
|
||
workflow( | ||
name = "Build", | ||
on = listOf( | ||
WorkflowDispatch(), | ||
), | ||
sourceFile = __FILE__, | ||
) { | ||
job( | ||
id = "check", | ||
runsOn = RunnerType.UbuntuLatest, | ||
) { | ||
uses(action = Checkout()) | ||
run( | ||
name = "Clone snakeyaml-engine", | ||
command = "git clone https://bitbucket.org/snakeyaml/snakeyaml-engine.git && cd snakeyaml-engine" | ||
) | ||
run( | ||
name = "Calculate changes between the last synced change and current state", | ||
// TODO: store this commit hash in a file | ||
// TODO: get the numerical value (| wc -l) | ||
command = "git log --oneline ef7ebe9c06e963e13f4ab465f300a0dd6f0940c9..master" | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# This file was generated using Kotlin DSL (.github/workflows/check-upstream.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: | ||
workflow_dispatch: {} | ||
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/check-upstream.yaml'' && ''.github/workflows/check-upstream.main.kts''' | ||
- id: 'step-2' | ||
name: 'Consistency check' | ||
run: 'git diff --exit-code ''.github/workflows/check-upstream.yaml''' | ||
check: | ||
runs-on: 'ubuntu-latest' | ||
needs: | ||
- 'check_yaml_consistency' | ||
steps: | ||
- id: 'step-0' | ||
uses: 'actions/checkout@v4' | ||
- id: 'step-1' | ||
name: 'Clone snakeyaml-engine' | ||
run: 'git clone https://bitbucket.org/snakeyaml/snakeyaml-engine.git && cd snakeyaml-engine' | ||
- id: 'step-2' | ||
name: 'Calculate changes between the last synced change and current state' | ||
run: 'git log --oneline ef7ebe9c06e963e13f4ab465f300a0dd6f0940c9..master' |