From c3f57b75d543ef7c3143a29b8d86cb57e7a67884 Mon Sep 17 00:00:00 2001 From: jordanbreen28 <jordan.breen@perforce.com> Date: Mon, 15 May 2023 16:46:08 +0100 Subject: [PATCH] (CONT-930) - Update release prep template --- README.md | 4 ++-- config_defaults.yml | 4 ++-- .../{auto_release.yml.erb => release_prep.yml.erb} | 8 +++++++- 3 files changed, 11 insertions(+), 5 deletions(-) rename moduleroot/.github/workflows/{auto_release.yml.erb => release_prep.yml.erb} (57%) diff --git a/README.md b/README.md index ffa7ee9..87aae72 100644 --- a/README.md +++ b/README.md @@ -51,9 +51,9 @@ The following is a description and explanation of each of the keys within config These workflows are depending on puppet-internal resources and are currently not suited for public consumption. Feel free to take them as inspiration how to run some tests on Github Actions. Please let us know at <ia_content@puppet.com> what you come up with! -### .github/workflows/auto_release.yml +### .github/workflows/release_prep.yml -The auto release workflows uses the PDK experimental command `pdk release prep` to prepare a module release PR. By default the workflow can be triggered manually when a release preparation PR needs to be created, however it allows setting a cron based trigger that can run automatically. +The auto release workflows prepares a module release PR. By default the workflow can be triggered manually when a release preparation PR needs to be created, however it allows setting a cron based trigger that can run automatically. To set up the automated release cron you can add a configuration to your .sync.yml file that matches the following example: ```yaml release_schedule: diff --git a/config_defaults.yml b/config_defaults.yml index 5f66fd7..5d3eb87 100644 --- a/config_defaults.yml +++ b/config_defaults.yml @@ -558,11 +558,11 @@ spec/spec_helper.rb: mock_with: ":rspec" strict_level: ":warning" strict_variables: true -.github/workflows/auto_release.yml: - unmanaged: true .github/workflows/ci.yml: unmanaged: true .github/workflows/nightly.yml: unmanaged: true .github/workflows/release.yml: unmanaged: true +.github/workflows/release_prep.yml: + unmanaged: true diff --git a/moduleroot/.github/workflows/auto_release.yml.erb b/moduleroot/.github/workflows/release_prep.yml.erb similarity index 57% rename from moduleroot/.github/workflows/auto_release.yml.erb rename to moduleroot/.github/workflows/release_prep.yml.erb index ea88b5d..534826d 100644 --- a/moduleroot/.github/workflows/auto_release.yml.erb +++ b/moduleroot/.github/workflows/release_prep.yml.erb @@ -1,5 +1,5 @@ <% common = config_for('common') -%> -name: "Auto release" +name: "Release Prep" on: <% if common['release_schedule'] -%> @@ -7,8 +7,14 @@ on: - cron: <%= common['release_schedule']['cron'] %> <% end -%> workflow_dispatch: + inputs: + version: + description: "Module version to be released. Must be a valid semver string. (1.2.3)" + required: true jobs: release_prep: uses: "puppetlabs/cat-github-actions/.github/workflows/module_release_prep.yml@main" + with: + version: "${{ github.event.inputs.version }}" secrets: "inherit" -- GitLab