Skip to content

Commit 07cdabd

Browse files
committed
example module workflows
1 parent ccab589 commit 07cdabd

File tree

6 files changed

+119
-0
lines changed

6 files changed

+119
-0
lines changed

example/module/ci.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "CI"
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "main"
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
Spec:
15+
uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main"
16+
secrets: "inherit"
17+
18+
Acceptance:
19+
needs: Spec
20+
uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main"
21+
secrets: "inherit"

example/module/labeller.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Labeller
2+
3+
on:
4+
issues:
5+
types: [ opened, reopened, labeled, unlabeled ]
6+
pull_request_target:
7+
types: [ opened, reopened, labeled, unlabeled ]
8+
9+
jobs:
10+
label:
11+
if: contains(fromJson('["puppetlabs", "puppet-toy-chest"]'), github.repository_owner)
12+
uses: "puppetlabs/cat-github-actions/.github/workflows/labeller.yml@main"
13+
secrets: inherit

example/module/mend.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: "mend"
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- synchronize
8+
schedule:
9+
- cron: "0 0 * * *"
10+
workflow_dispatch:
11+
12+
jobs:
13+
14+
mend:
15+
uses: "puppetlabs/cat-github-actions/.github/workflows/mend_ruby.yml@main"
16+
secrets: "inherit"

example/module/nightly.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: "nightly"
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
workflow_dispatch:
7+
8+
jobs:
9+
Spec:
10+
uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main"
11+
secrets: "inherit"
12+
13+
Acceptance:
14+
needs: Spec
15+
uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main"
16+
secrets: "inherit"

example/module/release.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: "Publish module"
2+
run-name: >
3+
${{ format('tag={0}', inputs.tag) }}
4+
${{ format('release={0}', inputs.release) }}
5+
${{ format('publish={0}', inputs.publish) }}
6+
${{ format('edit={0}', inputs.edit) }}
7+
8+
on:
9+
workflow_dispatch:
10+
inputs:
11+
tag:
12+
description: "Leave blank to tag HEAD of branch, or existing tag to edit"
13+
default: ''
14+
type: string
15+
release:
16+
description: "Create a Github release"
17+
type: boolean
18+
default: true
19+
publish:
20+
description: "Publish to the Forge"
21+
type: boolean
22+
default: true
23+
edit:
24+
description: "Regenerate release notes and existing tag"
25+
default: false
26+
type: boolean
27+
28+
jobs:
29+
release:
30+
uses: "puppetlabs/cat-github-actions/.github/workflows/module_release.yml@forked-modules"
31+
secrets: "inherit"
32+
with:
33+
tag: ${{ inputs.tag }}
34+
release: ${{ inputs.release }}
35+
publish: ${{ inputs.publish }}
36+
edit: ${{ inputs.edit }}

example/module/release_prep.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: "Release Prep"
2+
run-name: >
3+
version=${{ inputs.version }}
4+
5+
on:
6+
workflow_dispatch:
7+
inputs:
8+
version:
9+
description: "Module version to be released. Must be a valid semver string. (1.2.3)"
10+
required: true
11+
12+
jobs:
13+
release_prep:
14+
uses: "puppetlabs/cat-github-actions/.github/workflows/module_release_prep.yml@main"
15+
with:
16+
version: "${{ inputs.version }}"
17+
secrets: "inherit"

0 commit comments

Comments
 (0)