Skip to content

Commit 7a00749

Browse files
committed
feat: restructure workflows and enable automated releases
1 parent 59aaff4 commit 7a00749

14 files changed

Lines changed: 244 additions & 58 deletions

File tree

.github/renovate.json

Lines changed: 27 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,20 @@
33
"config:base",
44
":semanticCommits",
55
":semanticCommitType(deps)",
6-
":automergePatch"
6+
":automergeMinor"
77
],
8-
"regexManagers": [{
9-
"fileMatch": [
10-
"defaults/main.yml"
11-
],
12-
"matchStrings": [
13-
"# renovate: datasource=(?<datasource>\\S+) depName=(?<depName>\\S+)( versioning=(?<versioning>.*?))?\\n.*?_version: (?<currentValue>.*)\\s"
14-
]
15-
}],
16-
"packageRules": [{
8+
"regexManagers": [
9+
{
10+
"fileMatch": [
11+
"defaults/main.yml"
12+
],
13+
"matchStrings": [
14+
"# renovate: datasource=(?<datasource>\\S+) depName=(?<depName>\\S+)( versioning=(?<versioning>.*?))?\\n.*?_version: (?<currentValue>.*)\\s"
15+
]
16+
}
17+
],
18+
"packageRules": [
19+
{
1720
"description": "Strip v prefix from versions",
1821
"groupName": "version prefix",
1922
"matchDatasources": [
@@ -23,49 +26,37 @@
2326
"extractVersion": "^v(?<version>.*)$"
2427
},
2528
{
26-
"description": "Semantic commits for major updates",
27-
"groupName": "major updates",
28-
"matchDatasources": [
29-
"github-releases",
30-
"github-tags",
31-
"galaxy-collection"
32-
],
29+
"description": "Semantic commits for major versions",
30+
"groupName": "major versions",
3331
"matchUpdateTypes": [
3432
"major"
3533
],
36-
"semanticCommitScope": "major",
34+
"semanticCommitType": "major",
35+
"semanticCommitScope": "deps",
3736
"automerge": false
3837
},
3938
{
40-
"description": "Semantic commits for minor updates",
41-
"groupName": "minor updates",
42-
"matchDatasources": [
43-
"github-releases",
44-
"github-tags",
45-
"galaxy-collection"
46-
],
39+
"description": "Semantic commits for minor versions",
40+
"groupName": "minor versions",
4741
"matchUpdateTypes": [
4842
"minor"
4943
],
50-
"semanticCommitScope": "minor",
51-
"automerge": false
44+
"semanticCommitType": "minor",
45+
"semanticCommitScope": "deps",
46+
"automerge": true
5247
},
5348
{
54-
"description": "Semantic commits for patch updates",
55-
"groupName": "patch updates",
56-
"matchDatasources": [
57-
"github-releases",
58-
"github-tags",
59-
"galaxy-collection"
60-
],
49+
"description": "Semantic commits for patch versions",
50+
"groupName": "patch versions",
6151
"matchUpdateTypes": [
6252
"patch"
6353
],
64-
"semanticCommitScope": "patch",
54+
"semanticCommitType": "patch",
55+
"semanticCommitScope": "deps",
6556
"automerge": true
6657
}
6758
],
6859
"labels": [
6960
"renovate"
7061
]
71-
}
62+
}

.github/semantic.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
commitsOnly: true
3+
anyCommit: true
4+
allowMergeCommits: true
5+
allowRevertCommits: true
6+
7+
types:
8+
- feat
9+
- fix
10+
- docs
11+
- style
12+
- refactor
13+
- perf
14+
- test
15+
- build
16+
- ci
17+
- chore
18+
- revert
19+
- major
20+
- minor
21+
- patch
22+
23+
...

.github/settings.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ repository:
66

77
private: false
88
has_issues: true
9-
has_projects: false
109
has_wiki: false
1110
has_downloads: false
1211

@@ -16,6 +15,12 @@ repository:
1615
allow_merge_commit: true
1716
allow_rebase_merge: true
1817

18+
allow_update_branch: true
19+
allow_auto_merge: true
20+
delete_branch_on_merge: true
21+
enable_automated_security_fixes: true
22+
enable_vulnerability_alerts: true
23+
1924
labels:
2025
- name: bug
2126
color: d73a4a
@@ -54,12 +59,18 @@ labels:
5459
branches:
5560
- name: master
5661
protection:
62+
required_pull_request_reviews: null
5763
required_status_checks:
5864
strict: true
5965
contexts: []
6066
enforce_admins: false
6167
restrictions:
68+
apps:
69+
- renovate
6270
users: []
63-
teams: []
71+
teams:
72+
- admins
73+
- bots
74+
- members
6475

6576
...

.github/workflows/galaxy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: galaxy
33

4-
'on':
4+
"on":
55
push:
66
branches:
77
- master
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/checkout@v3
1818

1919
- name: Galaxy upload
20-
uses: robertdebock/galaxy-action@1.2.0
20+
uses: robertdebock/galaxy-action@1.2.1
2121
with:
2222
galaxy_api_key: ${{ secrets.GALAXY_TOKEN }}
2323

.github/workflows/general.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: general
33

4-
'on':
4+
"on":
55
push:
66
branches:
77
- master
@@ -28,18 +28,18 @@ jobs:
2828

2929
matrix:
3030
scenario:
31-
- ubuntu
31+
- default
3232

3333
steps:
3434
- name: Checkout source
3535
uses: actions/checkout@v3
36-
with:
37-
path: ${{ github.repository }}
3836

3937
- name: Molecule tests
4038
uses: gofrolist/molecule-action@v2
4139
with:
4240
molecule_command: test
4341
molecule_args: --scenario-name ${{ matrix.scenario }}
42+
env:
43+
ANSIBLE_FORCE_COLOR: "1"
4444

4545
...

.github/workflows/readme.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: readme
33

4-
'on':
4+
"on":
55
push:
66
branches:
77
- master
@@ -13,6 +13,8 @@ jobs:
1313
steps:
1414
- name: Checkout source
1515
uses: actions/checkout@v3
16+
with:
17+
token: ${{ secrets.BOT_ACCESS_TOKEN }}
1618

1719
- name: Generate readme
1820
uses: actionhippie/ansible-doctor@v1
@@ -26,7 +28,7 @@ jobs:
2628
author_name: GitHub Actions
2729
author_email: github@webhippie.de
2830
add: README.md
29-
message: automated readme update [skip ci]
31+
message: "docs: automated readme update [skip ci]"
3032
push: true
3133
commit: --signoff
3234

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: release
3+
4+
"on":
5+
push:
6+
branches:
7+
- master
8+
workflow_dispatch:
9+
10+
jobs:
11+
release:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout source
16+
uses: actions/checkout@v3
17+
with:
18+
token: ${{ secrets.BOT_ACCESS_TOKEN }}
19+
20+
- name: Semantic release
21+
uses: cycjimmy/semantic-release-action@v3
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.BOT_ACCESS_TOKEN }}
24+
with:
25+
extra_plugins: |
26+
conventional-changelog-conventionalcommits
27+
28+
...

.releaserc

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{
2+
"branches": [
3+
"master"
4+
],
5+
"plugins": [
6+
[
7+
"@semantic-release/commit-analyzer",
8+
{
9+
"preset": "conventionalcommits",
10+
"releaseRules": [
11+
{
12+
"type": "major",
13+
"release": "major"
14+
},
15+
{
16+
"type": "deps",
17+
"scope": "major",
18+
"release": "major"
19+
},
20+
{
21+
"type": "minor",
22+
"release": "minor"
23+
},
24+
{
25+
"type": "deps",
26+
"scope": "minor",
27+
"release": "minor"
28+
},
29+
{
30+
"type": "patch",
31+
"release": "patch"
32+
},
33+
{
34+
"type": "deps",
35+
"scope": "patch",
36+
"release": "patch"
37+
},
38+
{
39+
"type": "refactor",
40+
"release": "minor"
41+
},
42+
{
43+
"scope": "docs",
44+
"release": false
45+
}
46+
]
47+
}
48+
],
49+
[
50+
"@semantic-release/release-notes-generator",
51+
{
52+
"preset": "conventionalcommits",
53+
"presetConfig": {
54+
"types": [
55+
{
56+
"type": "feat",
57+
"section": "Features"
58+
},
59+
{
60+
"type": "major",
61+
"section": "Features"
62+
},
63+
{
64+
"type": "minor",
65+
"section": "Features"
66+
},
67+
{
68+
"type": "fix",
69+
"section": "Bugfixes"
70+
},
71+
{
72+
"type": "patch",
73+
"section": "Bugfixes"
74+
},
75+
{
76+
"type": "chore",
77+
"hidden": true
78+
},
79+
{
80+
"type": "docs",
81+
"hidden": true
82+
},
83+
{
84+
"type": "refactor",
85+
"hidden": true
86+
}
87+
]
88+
}
89+
}
90+
],
91+
[
92+
"@semantic-release/changelog",
93+
{
94+
"changelogTitle": "# Changelog"
95+
}
96+
],
97+
[
98+
"@semantic-release/git",
99+
{
100+
"message": "chore: release ${nextRelease.version}"
101+
}
102+
],
103+
[
104+
"@semantic-release/github",
105+
{
106+
"addReleases": true
107+
}
108+
]
109+
]
110+
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# rke
22

3-
[![Source Code](https://img.shields.io/badge/github-source%20code-blue?logo=github&logoColor=white)](https://github.com/rolehippie/rke) [![Testing Build](https://github.com/rolehippie/rke/workflows/testing/badge.svg)](https://github.com/rolehippie/rke/actions?query=workflow%3Atesting) [![Readme Build](https://github.com/rolehippie/rke/workflows/readme/badge.svg)](https://github.com/rolehippie/rke/actions?query=workflow%3Areadme) [![Galaxy Build](https://github.com/rolehippie/rke/workflows/galaxy/badge.svg)](https://github.com/rolehippie/rke/actions?query=workflow%3Agalaxy) [![License: Apache-2.0](https://img.shields.io/github/license/rolehippie/rke)](https://github.com/rolehippie/rke/blob/master/LICENSE)
3+
[![Source Code](https://img.shields.io/badge/github-source%20code-blue?logo=github&logoColor=white)](https://github.com/rolehippie/rke) [![General Workflow](https://github.com/rolehippie/rke/actions/workflows/general.yml/badge.svg)](https://github.com/rolehippie/rke/actions/workflows/general.yml) [![Readme Workflow](https://github.com/rolehippie/rke/actions/workflows/readme.yml/badge.svg)](https://github.com/rolehippie/rke/actions/workflows/readme.yml) [![Galaxy Workflow](https://github.com/rolehippie/rke/actions/workflows/galaxy.yml/badge.svg)](https://github.com/rolehippie/rke/actions/workflows/galaxy.yml) [![License: Apache-2.0](https://img.shields.io/github/license/rolehippie/rke)](https://github.com/rolehippie/rke/blob/master/LICENSE) [![Ansible Role](https://img.shields.io/ansible/role/51496)](https://galaxy.ansible.com/rolehippie/rke)
44

55
Ansible role to deploy Kubernetes with Rancher Kubernetes Engine.
66

0 commit comments

Comments
 (0)