Skip to content

Commit

Permalink
yaml => yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Vampire committed Apr 17, 2023
1 parent bdfc6fb commit b8fd23e
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/workflows/branches-and-prs.main.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ workflow(
)
),
sourceFile = __FILE__.toPath(),
targetFileName = "${__FILE__.name.substringBeforeLast(".main.kts")}.yml",
// https://stackoverflow.com/a/72408109/16358266
concurrency = Concurrency(
group = "${expr { github.workflow }}-${expr("${Contexts.github.eventPullRequest.pull_request.number} || ${Contexts.github.ref}")}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
uses: actions/checkout@v3
- id: step-1
name: Execute script
run: rm '.github/workflows/branches-and-prs.yaml' && '.github/workflows/branches-and-prs.main.kts'
run: rm '.github/workflows/branches-and-prs.yml' && '.github/workflows/branches-and-prs.main.kts'
- id: step-2
name: Consistency check
run: git diff --exit-code '.github/workflows/branches-and-prs.yaml'
run: git diff --exit-code '.github/workflows/branches-and-prs.yml'
check_all_workflow_yaml_consistency:
name: Check all Workflow YAML consistency
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/codeql-analysis.main.kts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ workflow(
)
),
sourceFile = __FILE__.toPath(),
targetFileName = "${__FILE__.name.substringBeforeLast(".main.kts")}.yml",
// https://stackoverflow.com/a/72408109/16358266
concurrency = Concurrency(
group = "${expr { github.workflow }}-${expr("${github.eventPullRequest.pull_request.number} || ${github.ref}")}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
uses: actions/checkout@v3
- id: step-1
name: Execute script
run: rm '.github/workflows/codeql-analysis.yaml' && '.github/workflows/codeql-analysis.main.kts'
run: rm '.github/workflows/codeql-analysis.yml' && '.github/workflows/codeql-analysis.main.kts'
- id: step-2
name: Consistency check
run: git diff --exit-code '.github/workflows/codeql-analysis.yaml'
run: git diff --exit-code '.github/workflows/codeql-analysis.yml'
codeql-build:
name: CodeQL-Build
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/gradle-wrapper-validation.main.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ workflow(
Push(),
PullRequest()
),
sourceFile = __FILE__.toPath()
sourceFile = __FILE__.toPath(),
targetFileName = "${__FILE__.name.substringBeforeLast(".main.kts")}.yml"
) {
job(
id = "validation",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
uses: actions/checkout@v3
- id: step-1
name: Execute script
run: rm '.github/workflows/gradle-wrapper-validation.yaml' && '.github/workflows/gradle-wrapper-validation.main.kts'
run: rm '.github/workflows/gradle-wrapper-validation.yml' && '.github/workflows/gradle-wrapper-validation.main.kts'
- id: step-2
name: Consistency check
run: git diff --exit-code '.github/workflows/gradle-wrapper-validation.yaml'
run: git diff --exit-code '.github/workflows/gradle-wrapper-validation.yml'
validation:
name: Validation
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.main.kts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ workflow(
tags = listOf("spock-*")
)
),
sourceFile = __FILE__.toPath()
sourceFile = __FILE__.toPath(),
targetFileName = "${__FILE__.name.substringBeforeLast(".main.kts")}.yml"
) {
val GITHUB_TOKEN by Contexts.secrets
val SONATYPE_OSS_USER by Contexts.secrets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
uses: actions/checkout@v3
- id: step-1
name: Execute script
run: rm '.github/workflows/release.yaml' && '.github/workflows/release.main.kts'
run: rm '.github/workflows/release.yml' && '.github/workflows/release.main.kts'
- id: step-2
name: Consistency check
run: git diff --exit-code '.github/workflows/release.yaml'
run: git diff --exit-code '.github/workflows/release.yml'
build-and-verify:
name: Build and Verify
runs-on: ${{ matrix.os }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class PreprocessWorkflowsPlugin implements Plugin<Project> {
.file(workflowScript)
.withPropertyName('workflowScript')
it.outputs
.file(new File(workflowScript.parent, "${workflowName}.yaml"))
.file(new File(workflowScript.parent, "${workflowName}.yml"))
.withPropertyName('workflowFile')

it.javaLauncher.set project.extensions.getByType(JavaToolchainService).launcherFor {
Expand Down

0 comments on commit b8fd23e

Please sign in to comment.