From 4d6f8ee57803d5170d0a9569944d5322e5eb44d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Segovia=20C=C3=B3rdoba?= Date: Wed, 7 Feb 2024 19:03:55 +0100 Subject: [PATCH] Improve workflows --- .../workflows/build-kotlin-dispatcher.yaml | 28 +++++++++---------- .github/workflows/fix-checks.yaml | 11 ++++++++ .github/workflows/generate-version-tag.yaml | 6 ++-- 3 files changed, 28 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/fix-checks.yaml diff --git a/.github/workflows/build-kotlin-dispatcher.yaml b/.github/workflows/build-kotlin-dispatcher.yaml index e7239324f0..a4b9e4faa2 100644 --- a/.github/workflows/build-kotlin-dispatcher.yaml +++ b/.github/workflows/build-kotlin-dispatcher.yaml @@ -3,40 +3,40 @@ name: build-kotlin-dispatcher on: workflow_dispatch: inputs: - gradle-args: + gradle_args: description: 'Gradle args for every step' default: '' required: false type: string - deploy-docs: + deploy_docs: description: 'Deploy docs to GitHub Pages' default: false required: false type: boolean - publish-all-docs: + publish_all_docs: description: 'Publish all docs instead of only API docs and reports' required: false default: false type: boolean - publish-snapshot-tag-prefix: + publish_snapshot_tag_prefix: description: 'Publish snapshot based on a custom tag prefix' default: 'null' required: false type: choice options: - - 'null' + - 'p' - 'c' - kotlin-dev-version: + kotlin_dev_version: description: 'Kotlin dev version, for example `1.9.20-dev-5788`' default: '' required: false type: string - semver-stage: + semver_stage: description: 'Version stage (`semver.stage` property), for example `snapshot`' - default: '' + default: 'snapshot' required: false type: string - semver-checkClean: + semver_checkClean: description: 'Check the repo status at each step with `-P semver.checkClean=true`' default: false required: false @@ -47,10 +47,10 @@ jobs: uses: JavierSegoviaCordoba/reusable-workflows/.github/workflows/build-kotlin.yaml@main with: allow-github-actor-bots: false - gradle-args: '${{ github.event.inputs.gradle-args }} -P kotlinVersion=${{ github.event.inputs.kotlin-dev-version }} -P semver.stage=${{ github.event.inputs.semver-stage }} -P semver.checkClean=${{ github.event.inputs.semver-checkClean }}' - run_before_args: './gradlew assemble publishToMavenLocalTest ${{ github.event.inputs.gradle-args }} -P kotlinVersion=${{ github.event.inputs.kotlin-dev-version }} -P semver.stage=${{ github.event.inputs.semver-stage }} -P semver.checkClean=${{ github.event.inputs.semver-checkClean }}' - deploy-docs: ${{ github.event.inputs.deploy-docs }} - publish-all-docs: '${{ github.event.inputs.publish-all-docs }}' - publish-snapshot-tag-prefix: '${{ github.event.inputs.publish-snapshot-tag-prefix }}' + gradle-args: '${{ github.event.inputs.gradle_args }} -P kotlinVersion=${{ github.event.inputs.kotlin_dev_version }} -P semver.stage=${{ github.event.inputs.semver_stage }} -P semver.checkClean=${{ github.event.inputs.semver_checkClean }}' + run_before_args: './gradlew assemble publishToMavenLocalTest ${{ github.event.inputs.gradle_args }} -P kotlinVersion=${{ github.event.inputs.kotlin_dev_version }} -P semver.tagPrefix=${{ github.event.inputs.publish_snapshot_tag_prefix }} -P semver.stage=${{ github.event.inputs.semver_stage }} -P semver.checkClean=${{ github.event.inputs.semver_checkClean }}' + deploy-docs: ${{ github.event.inputs.deploy_docs }} + publish-all-docs: '${{ github.event.inputs.publish_all_docs }}' + publish-snapshot-tag-prefix: '${{ github.event.inputs.publish_snapshot_tag_prefix }}' restore-kotlin-native-cache: false secrets: inherit diff --git a/.github/workflows/fix-checks.yaml b/.github/workflows/fix-checks.yaml new file mode 100644 index 0000000000..ae4271d18b --- /dev/null +++ b/.github/workflows/fix-checks.yaml @@ -0,0 +1,11 @@ +name: fix-checks + +on: + workflow_dispatch: + +jobs: + fix-checks: + uses: JavierSegoviaCordoba/reusable-workflows/.github/workflows/fix-checks.yaml@main + with: + restore-kotlin-native-cache: false + secrets: inherit diff --git a/.github/workflows/generate-version-tag.yaml b/.github/workflows/generate-version-tag.yaml index a009796b32..f3f1f2c69e 100644 --- a/.github/workflows/generate-version-tag.yaml +++ b/.github/workflows/generate-version-tag.yaml @@ -4,7 +4,7 @@ on: workflow_dispatch: if: github.ref == 'refs/heads/main' inputs: - publish-project: + publish_project: description: 'Project to publish' required: true default: 'plugin' @@ -37,7 +37,7 @@ on: jobs: plugin: uses: JavierSegoviaCordoba/reusable-workflows/.github/workflows/generate-version-tag.yaml@main - if: "${{ github.event.inputs.publish-project == 'plugin' }}" + if: "${{ github.event.inputs.publish_project == 'plugin' }}" with: project-path: ':' tag-prefix: 'p' @@ -48,7 +48,7 @@ jobs: catalog: uses: JavierSegoviaCordoba/reusable-workflows/.github/workflows/generate-version-tag.yaml@main - if: "${{ github.event.inputs.publish-project == 'catalog' }}" + if: "${{ github.event.inputs.publish_project == 'catalog' }}" with: semver-output-field: 'SEMVER_HUBDLE_VERSION_CATALOG' project-path: 'hubdle-version-catalog:'