Skip to content

Commit

Permalink
feat(workflows): update
Browse files Browse the repository at this point in the history
  • Loading branch information
kireque committed May 4, 2024
1 parent fc6b1bb commit 5adfc98
Show file tree
Hide file tree
Showing 18 changed files with 493 additions and 174 deletions.
5 changes: 1 addition & 4 deletions .github/labeler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,4 @@ area/kubernetes:
# Cluster
cluster/main:
- changed-files:
- any-glob-to-any-file: kubernetes/main/**/*
cluster/nas:
- changed-files:
- any-glob-to-any-file: kubernetes/nas/**/*
- any-glob-to-any-file: kubernetes/main/**/*
2 changes: 0 additions & 2 deletions .github/linters/.flake8

This file was deleted.

23 changes: 0 additions & 23 deletions .github/linters/.markdownlint.yaml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/linters/.yamllint.yaml

This file was deleted.

42 changes: 5 additions & 37 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@
"github>kireque/renovate-config:automerge-github-actions",
"github>kireque/home-ops//.github/renovate/allowedVersions.json5",
"github>kireque/home-ops//.github/renovate/autoMerge.json5",
"github>kireque/home-ops//.github/renovate/disabledDatasources.json5",
"github>kireque/home-ops//.github/renovate/versioning.json5",
"github>kireque/home-ops//.github/renovate/groups.json5",
"github>kireque/home-ops//.github/renovate/clusters.json5",
"github>kireque/home-ops//.github/renovate/grafanaDashboards.json5",
],
platform: "github",
username: "kireque-bot[bot]",
gitAuthor: "kireque-bot <143391978+kireque-bot[bot]@users.noreply.github.com>",
repositories: ["kireque/home-ops"],
ignorePaths: ["^archive/**"],
ignorePaths: [".archive/**"],
flux: {
fileMatch: ["^kubernetes/.+\\.ya?ml$"],
},
Expand All @@ -22,34 +20,4 @@
kubernetes: {
fileMatch: ["^kubernetes/.+\\.ya?ml$"],
},
packageRules: [
// Custom version schemes
{
description: "Use custom versioning for http-https-echo",
matchDatasources: ["docker"],
matchPackageNames: ["ghcr.io/mendhak/http-https-echo"],
versioning: "regex:^(?<major>\\d+)$",
},
{
description: "Use custom versioning for Minio",
matchDatasources: ["docker"],
versioning: "regex:^RELEASE\\.(?<major>\\d+)-(?<minor>\\d+)-(?<patch>\\d+)T.*Z(-(?<compatibility>.*))?$",
matchPackageNames: ["quay.io/minio/minio"],
},
// Version strategies
{
matchDatasources: ["docker"],
matchPackageNames: [
"ghcr.io/onedr0p/plex",
"ghcr.io/onedr0p/qbittorrent",
"ghcr.io/xirixiz/dsmr-reader-docker",
],
versioning: "loose",
},
{
matchDatasources: ["docker"],
matchPackageNames: ["tomsquest/docker-radicale"],
versioning: "pep440",
},
],
}
}
7 changes: 6 additions & 1 deletion .github/renovate/allowedVersions.json5
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
$schema: "https://docs.renovatebot.com/renovate-schema.json",
packageRules: [
{
matchDatasources: ["docker"],
Expand All @@ -11,5 +11,10 @@
matchPackageNames: ["tomsquest/docker-radicale"],
allowedVersions: "/^[0-9]+\\.[0-9]+\\.[0-9]+(\\.[0-9]+)?$/",
},
{
matchDatasources: ["docker"],
matchPackageNames: ["docker.io/kopia/kopia"],
allowedVersions: "<999",
},
],
}
13 changes: 6 additions & 7 deletions .github/renovate/autoMerge.json5
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
$schema: "https://docs.renovatebot.com/renovate-schema.json",
packageRules: [
{
description: "Auto merge container digests",
matchDatasources: ["docker"],
automerge: true,
automergeType: "branch",
matchUpdateTypes: ["digest"],
matchPackagePattern: ["ghcr.io/onedr0p"],
matchPackagePrefixes: ["ghcr.io/onedr0p", "ghcr.io/bjw-s"],
ignoreTests: true,
},
{
description: "Auto merge containers",
matchDatasources: ["docker"],
description: "Auto merge KPS minors and patches",
matchDatasources: ["helm"],
automerge: true,
automergeType: "branch",
matchUpdateTypes: ["minor", "patch"],
matchPackageNames: ["ghcr.io/onedr0p/prowlarr-nightly"],
ignoreTests: true,
matchPackageNames: ["kube-prometheus-stack"],
ignoreTests: false,
},
],
}
10 changes: 10 additions & 0 deletions .github/renovate/clusters.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
$schema: "https://docs.renovatebot.com/renovate-schema.json",
packageRules: [
{
description: "Separate PRs for main cluster",
matchFileNames: ["**/kubernetes/main/**"],
additionalBranchPrefix: "main-",
},
],
}
34 changes: 34 additions & 0 deletions .github/renovate/grafanaDashboards.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
$schema: "https://docs.renovatebot.com/renovate-schema.json",
customDatasources: {
"grafana-dashboards": {
defaultRegistryUrlTemplate: "https://grafana.com/api/dashboards/{{packageName}}",
format: "json",
transformTemplates: ['{"releases":[{"version": $string(revision)}]}'],
},
},
customManagers: [
{
customType: "regex",
description: "Process Grafana dashboards",
fileMatch: ["(^|/)kubernetes/.+\\.ya?ml(\\.j2)?$"],
matchStrings: [
'# renovate: dashboardName="(?<depName>.*)"\\n(?<indentation>\\s+)gnetId: (?<packageName>\\d+)\\n.+revision: (?<currentValue>\\d+)',
],
autoReplaceStringTemplate: '# renovate: dashboardName="{{{depName}}}"\n{{{indentation}}}gnetId: {{{packageName}}}\n{{{indentation}}}revision: {{{newValue}}}',
datasourceTemplate: "custom.grafana-dashboards",
versioningTemplate: "regex:^(?<major>\\d+)$",
},
],
packageRules: [
{
addLabels: ["renovate/grafana-dashboard"],
matchDatasources: ["custom.grafana-dashboards"],
matchUpdateTypes: ["major"],
semanticCommitScope: "grafana-dashboards",
semanticCommitType: "chore",
commitMessageTopic: "dashboard {{depName}}",
commitMessageExtra: "( {{currentVersion}} → {{newVersion}} )",
},
],
}
64 changes: 45 additions & 19 deletions .github/renovate/groups.json5
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,6 @@
},
separateMinorPatch: true,
},
{
description: "Immich images",
groupName: "Immich",
matchPackageNames: [
"ghcr.io/immich-app/immich-server",
"ghcr.io/immich-app/immich-web",
"ghcr.io/immich-app/immich-machine-learning",
],
matchDatasources: ["docker"],
group: {
commitMessageTopic: "{{{groupName}}} group",
},
separateMinorPatch: true,
},
{
description: "Rook-Ceph image and chart",
groupName: "Rook Ceph",
Expand All @@ -51,10 +37,26 @@
separateMinorPatch: true,
},
{
description: "External Snapshotter charts",
groupName: "External Snapshotter",
matchPackageNames: ["snapshot-controller", "snapshot-validation-webhook"],
matchDatasources: ["helm"],
description: "Actions Runner Controller charts",
groupName: "ARC",
matchPackageNames: [
"actions-runner-controller-charts/gha-runner-scale-set-controller",
"actions-runner-controller-charts/gha-runner-scale-set",
],
matchDatasources: ["helm", "docker"],
group: {
commitMessageTopic: "{{{groupName}}} group",
},
separateMinorPatch: false,
},
{
description: "Talos",
groupName: "Talos",
matchPackageNames: [
"ghcr.io/siderolabs/installer",
"ghcr.io/siderolabs/talosctl",
],
matchDatasources: ["docker"],
group: {
commitMessageTopic: "{{{groupName}}} group",
},
Expand Down Expand Up @@ -82,5 +84,29 @@
},
separateMinorPatch: false,
},
{
description: "Maker Management Platform",
groupName: "maker-management-platform",
matchPackageNames: [
"ghcr.io/maker-management-platform/mmp-ui",
"ghcr.io/maker-management-platform/agent",
],
matchDatasources: ["docker"],
versioning: "semver",
group: {
commitMessageTopic: "{{{groupName}}} group",
},
separateMinorPatch: true,
},
{
"description": "Dragonfly operator",
"groupName": "Dragonfly Operator",
"matchPackagePatterns": ["dragonfly(?:db)?.operator"],
"matchDatasources": ["docker", "github-releases"],
"group": {
"commitMessageTopic": "{{{groupName}}} group"
},
"separateMinorPatch": true
},
],
}
}
51 changes: 51 additions & 0 deletions .github/renovate/versioning.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
$schema: "https://docs.renovatebot.com/renovate-schema.json",
packageRules: [
{
description: "Loose versioning for non-semver packages",
matchDatasources: ["docker"],
matchPackageNames: [
"ghcr.io/onedr0p/plex",
"ghcr.io/onedr0p/qbittorrent",
"ghcr.io/xirixiz/dsmr-reader-docker",
],
versioning: "loose",
},
{
description: "PEP440 versioning for radicale",
matchDatasources: ["docker"],
matchPackageNames: ["tomsquest/docker-radicale"],
versioning: "pep440",
},
{
description: "Custom versioning for http-https-echo",
matchDatasources: ["docker"],
matchPackageNames: ["ghcr.io/mendhak/http-https-echo"],
versioning: "regex:^(?<major>\\d+)$",
},
{
description: "Custom versioning for Minio",
matchDatasources: ["docker"],
versioning: "regex:^RELEASE\\.(?<major>\\d+)-(?<minor>\\d+)-(?<patch>\\d+)T.*Z(-(?<compatibility>.*))?$",
matchPackageNames: ["quay.io/minio/minio"],
},
{
description: "Custom versioning for Scrypted",
matchDatasources: ["docker"],
versioning: "regex:^(?<compatibility>(?<nodeVersion>\\d{2})-(?<ubuntuVersion>.*?)-(?<scryptedFlavor>.*?))-v(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)$",
matchPackageNames: ["ghcr.io/koush/scrypted"],
},
{
description: "Custom versioning for miniflux",
matchDatasources: ["docker"],
versioning: "regex:^(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)-(?<compatibility>)$",
matchPackageNames: ["ghcr.io/miniflux/miniflux"],
},
{
description: "Custom versioning for music-assistant server",
matchDatasources: ["docker"],
versioning: "regex:^(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)b(?<build>\\d+)$",
matchPackageNames: ["ghcr.io/music-assistant/server"],
},
],
}
5 changes: 2 additions & 3 deletions .github/workflows/build-terraform-oci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Get changed files
id: changed-files
Expand Down Expand Up @@ -51,9 +53,6 @@ jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs:
- changed-files
if: ${{ needs.changed-files.outputs.matrix != '[]' }}
Expand Down
Loading

0 comments on commit 5adfc98

Please sign in to comment.