Skip to content

Commit 0634b9e

Browse files
authored
Merge pull request puppetlabs#438 from carabasdaniel/autoreleaseimprovement
Allow auto_release workflow schedule configuration
2 parents dd6e237 + 4f567fc commit 0634b9e

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,16 @@ If you are using Gitpod you will need to opt-in and enable gitpod support for pd
110110

111111
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 <[email protected]> what you come up with!
112112

113+
### .github/workflows/auto_release.yml
114+
115+
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.
116+
To set up the automated release cron you can add a configuration to your .sync.yml file that matches the following example:
117+
```yaml
118+
release_schedule:
119+
cron: '0 3 * * 6'
120+
```
121+
In this example the automated release prep workflow is triggered every Saturday at 3 am.
122+
113123
### .pdkignore
114124

115125
>A .pdkignore file in your repo allows you to specify files to ignore when building a module package with `pdk build`.

moduleroot/.github/workflows/auto_release.yml.erb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
name: "Auto release"
33

44
on:
5+
<% if common['release_schedule'] -%>
56
schedule:
6-
- cron: '0 3 * * 6'
7+
- cron: <%= common['release_schedule']['cron'] %>
8+
<% end -%>
79
workflow_dispatch:
810

911
env:

0 commit comments

Comments
 (0)