From 9267bae8f048fde12d7494860779d84df953850b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Kautler?= Date: Mon, 17 Apr 2023 10:10:31 +0200 Subject: [PATCH] yaml => yml --- .github/workflows/branches-and-prs.main.kts | 1 + .../workflows/{branches-and-prs.yaml => branches-and-prs.yml} | 4 ++-- .github/workflows/codeql-analysis.main.kts | 1 + .../workflows/{codeql-analysis.yaml => codeql-analysis.yml} | 4 ++-- .github/workflows/gradle-wrapper-validation.main.kts | 3 ++- ...-wrapper-validation.yaml => gradle-wrapper-validation.yml} | 4 ++-- .github/workflows/release.main.kts | 3 ++- .github/workflows/{release.yaml => release.yml} | 4 ++-- .../spockframework/gradle/PreprocessWorkflowsPlugin.groovy | 2 +- 9 files changed, 15 insertions(+), 11 deletions(-) rename .github/workflows/{branches-and-prs.yaml => branches-and-prs.yml} (96%) rename .github/workflows/{codeql-analysis.yaml => codeql-analysis.yml} (93%) rename .github/workflows/{gradle-wrapper-validation.yaml => gradle-wrapper-validation.yml} (87%) rename .github/workflows/{release.yaml => release.yml} (97%) diff --git a/.github/workflows/branches-and-prs.main.kts b/.github/workflows/branches-and-prs.main.kts index ec9564c8a1..af084dd300 100755 --- a/.github/workflows/branches-and-prs.main.kts +++ b/.github/workflows/branches-and-prs.main.kts @@ -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}")}", diff --git a/.github/workflows/branches-and-prs.yaml b/.github/workflows/branches-and-prs.yml similarity index 96% rename from .github/workflows/branches-and-prs.yaml rename to .github/workflows/branches-and-prs.yml index b8029c0a3b..b888f8b772 100644 --- a/.github/workflows/branches-and-prs.yaml +++ b/.github/workflows/branches-and-prs.yml @@ -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 diff --git a/.github/workflows/codeql-analysis.main.kts b/.github/workflows/codeql-analysis.main.kts index f39d9889e9..7447fabca0 100755 --- a/.github/workflows/codeql-analysis.main.kts +++ b/.github/workflows/codeql-analysis.main.kts @@ -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}")}", diff --git a/.github/workflows/codeql-analysis.yaml b/.github/workflows/codeql-analysis.yml similarity index 93% rename from .github/workflows/codeql-analysis.yaml rename to .github/workflows/codeql-analysis.yml index fb0248fc62..1cd3fd115f 100644 --- a/.github/workflows/codeql-analysis.yaml +++ b/.github/workflows/codeql-analysis.yml @@ -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 diff --git a/.github/workflows/gradle-wrapper-validation.main.kts b/.github/workflows/gradle-wrapper-validation.main.kts index 53a46f19a6..ab882e029f 100755 --- a/.github/workflows/gradle-wrapper-validation.main.kts +++ b/.github/workflows/gradle-wrapper-validation.main.kts @@ -32,7 +32,8 @@ workflow( Push(), PullRequest() ), - sourceFile = __FILE__.toPath() + sourceFile = __FILE__.toPath(), + targetFileName = "${__FILE__.name.substringBeforeLast(".main.kts")}.yml" ) { job( id = "validation", diff --git a/.github/workflows/gradle-wrapper-validation.yaml b/.github/workflows/gradle-wrapper-validation.yml similarity index 87% rename from .github/workflows/gradle-wrapper-validation.yaml rename to .github/workflows/gradle-wrapper-validation.yml index 19bda3bd90..1b344e6aad 100644 --- a/.github/workflows/gradle-wrapper-validation.yaml +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -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 diff --git a/.github/workflows/release.main.kts b/.github/workflows/release.main.kts index 77f207ae84..a1f3a520a2 100755 --- a/.github/workflows/release.main.kts +++ b/.github/workflows/release.main.kts @@ -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 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yml similarity index 97% rename from .github/workflows/release.yaml rename to .github/workflows/release.yml index 345508fc76..a9835d3143 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yml @@ -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 }} diff --git a/build-logic/preprocess-workflows/src/main/groovy/org/spockframework/gradle/PreprocessWorkflowsPlugin.groovy b/build-logic/preprocess-workflows/src/main/groovy/org/spockframework/gradle/PreprocessWorkflowsPlugin.groovy index 0482a9d73c..a536f92f4a 100644 --- a/build-logic/preprocess-workflows/src/main/groovy/org/spockframework/gradle/PreprocessWorkflowsPlugin.groovy +++ b/build-logic/preprocess-workflows/src/main/groovy/org/spockframework/gradle/PreprocessWorkflowsPlugin.groovy @@ -48,7 +48,7 @@ class PreprocessWorkflowsPlugin implements Plugin { .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 {