Skip to content

Commit

Permalink
ci: improve workflows and configs, add release-please workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tboerger committed Dec 29, 2022
1 parent fcb4157 commit 5b398d1
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 54 deletions.
57 changes: 24 additions & 33 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@
"config:base",
":semanticCommits",
":semanticCommitType(deps)",
":automergePatch"
":automergeMinor"
],
"regexManagers": [{
"fileMatch": [
"defaults/main.yml"
],
"matchStrings": [
"# renovate: datasource=(?<datasource>\\S+) depName=(?<depName>\\S+)( versioning=(?<versioning>.*?))?\\n.*?_version: (?<currentValue>.*)\\s"
]
}],
"packageRules": [{
"regexManagers": [
{
"fileMatch": [
"defaults/main.yml"
],
"matchStrings": [
"# renovate: datasource=(?<datasource>\\S+) depName=(?<depName>\\S+)( versioning=(?<versioning>.*?))?\\n.*?_version: (?<currentValue>.*)\\s"
]
}
],
"packageRules": [
{
"description": "Strip v prefix from versions",
"groupName": "version prefix",
"matchDatasources": [
Expand All @@ -23,49 +26,37 @@
"extractVersion": "^v(?<version>.*)$"
},
{
"description": "Semantic commits for major updates",
"groupName": "major updates",
"matchDatasources": [
"github-releases",
"github-tags",
"galaxy-collection"
],
"description": "Semantic commits for major versions",
"groupName": "major versions",
"matchUpdateTypes": [
"major"
],
"semanticCommitType": "deps",
"semanticCommitScope": "major",
"automerge": false
},
{
"description": "Semantic commits for minor updates",
"groupName": "minor updates",
"matchDatasources": [
"github-releases",
"github-tags",
"galaxy-collection"
],
"description": "Semantic commits for minor versions",
"groupName": "minor versions",
"matchUpdateTypes": [
"minor"
],
"semanticCommitType": "deps",
"semanticCommitScope": "minor",
"automerge": false
"automerge": true
},
{
"description": "Semantic commits for patch updates",
"groupName": "patch updates",
"matchDatasources": [
"github-releases",
"github-tags",
"galaxy-collection"
],
"description": "Semantic commits for patch versions",
"groupName": "patch versions",
"matchUpdateTypes": [
"patch"
],
"semanticCommitType": "deps",
"semanticCommitScope": "patch",
"automerge": true
}
],
"labels": [
"renovate"
]
}
}
18 changes: 15 additions & 3 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ repository:

private: false
has_issues: true
has_projects: false
has_wiki: false
has_downloads: false

Expand All @@ -16,6 +15,12 @@ repository:
allow_merge_commit: true
allow_rebase_merge: true

allow_update_branch: true
allow_auto_merge: true
delete_branch_on_merge: true
enable_automated_security_fixes: true
enable_vulnerability_alerts: true

labels:
- name: bug
color: d73a4a
Expand Down Expand Up @@ -54,12 +59,19 @@ labels:
branches:
- name: master
protection:
required_pull_request_reviews: null
required_status_checks:
strict: true
contexts: []
contexts:
- testing
enforce_admins: false
restrictions:
apps:
- renovate
users: []
teams: []
teams:
- admins
- bots
- members

...
4 changes: 3 additions & 1 deletion .github/workflows/readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
steps:
- name: Checkout source
uses: actions/checkout@v3
with:
token: ${{ secrets.BOT_ACCESS_TOKEN }}

- name: Generate readme
uses: actionhippie/ansible-doctor@v1
Expand All @@ -26,7 +28,7 @@ jobs:
author_name: GitHub Actions
author_email: [email protected]
add: README.md
message: automated readme update [skip ci]
message: "docs: automated readme update [skip ci]"
push: true
commit: --signoff

Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: release

"on":
push:
branches:
- master

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Release please
uses: google-github-actions/release-please-action@v3
with:
release-type: simple
package-name: rclone
skip-github-release: true

...
3 changes: 2 additions & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ galaxy_info:
author: Thomas Boerger
description: Ansible role to install and configure rclone backup solution
license: Apache-2.0
min_ansible_version: 2.10
min_ansible_version: "2.10"
platforms:
- name: Ubuntu
versions:
- bionic
- focal
- jammy
galaxy_tags:
- backup
- s3
Expand Down
26 changes: 12 additions & 14 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,30 @@ driver:
name: docker

platforms:
- name: rclone-ubuntu-22
image: geerlingguy/docker-ubuntu2204-ansible:latest
hostname: ubuntu
privileged: True
pre_build_image: True
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- name: rclone-ubuntu-20
image: mpaivabarbosa/molecule-systemd-ubuntu:20.04
image: geerlingguy/docker-ubuntu2004-ansible:latest
hostname: ubuntu
privileged: True
pre_build_image: True
override_command: False
tmpfs:
- /run
- /tmp
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
environment:
container: docker
- name: rclone-ubuntu-18
image: mpaivabarbosa/molecule-systemd-ubuntu:18.04
image: geerlingguy/docker-ubuntu1804-ansible:latest
hostname: ubuntu
privileged: True
pre_build_image: True
override_command: False
tmpfs:
- /run
- /tmp
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
environment:
container: docker

provisioner:
name: ansible
Expand Down
4 changes: 2 additions & 2 deletions molecule/default/tests/test_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
).get_hosts("all")


def test_dummy(host):
assert True
def test_executable(host):
assert host.file("/usr/bin/rclone").is_file
1 change: 1 addition & 0 deletions version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.0

0 comments on commit 5b398d1

Please sign in to comment.