From 28e280a3de13a94ba235b8affec411aa29ef3fcd Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Fri, 23 Dec 2022 13:47:37 -0500 Subject: [PATCH] chore: tweak link check workflow and renovate config Signed-off-by: Devin Buhl --- .github/renovate.json5 | 8 +- .github/renovate/autoMerge.json5 | 13 ++ .github/renovate/commitMessage.json5 | 15 +++ .github/renovate/labels.json5 | 40 ++++++ .github/renovate/semanticCommits.json5 | 114 ++++++++++++++++++ .../{link-checker.yaml => link-check.yaml} | 25 +++- .lycheeignore | 0 7 files changed, 206 insertions(+), 9 deletions(-) create mode 100644 .github/renovate/autoMerge.json5 create mode 100644 .github/renovate/commitMessage.json5 create mode 100644 .github/renovate/labels.json5 create mode 100644 .github/renovate/semanticCommits.json5 rename .github/workflows/{link-checker.yaml => link-check.yaml} (65%) create mode 100644 .lycheeignore diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 2525ee93..224b4149 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -8,10 +8,10 @@ ":enablePreCommit", ":automergeDigest", ":automergeBranch", - "github>onedr0p/home-ops//.github/renovate/autoMerge.json5", - "github>onedr0p/home-ops//.github/renovate/commitMessage.json5", - "github>onedr0p/home-ops//.github/renovate/labels.json5", - "github>onedr0p/home-ops//.github/renovate/semanticCommits.json5", + "github>onedr0p/flux-cluster-template//.github/renovate/autoMerge.json5", + "github>onedr0p/flux-cluster-template//.github/renovate/commitMessage.json5", + "github>onedr0p/flux-cluster-template//.github/renovate/labels.json5", + "github>onedr0p/flux-cluster-template//.github/renovate/semanticCommits.json5", "helpers:pinGitHubActionDigests" ], "dependencyDashboard": true, diff --git a/.github/renovate/autoMerge.json5 b/.github/renovate/autoMerge.json5 new file mode 100644 index 00000000..7c2b87ea --- /dev/null +++ b/.github/renovate/autoMerge.json5 @@ -0,0 +1,13 @@ +{ + "packageRules": [ + { + "description": "Auto merge GitHub Actions", + "matchManagers": ["github-actions"], + "matchDatasources": ["github-tags"], + "automerge": true, + "automergeType": "branch", + "requiredStatusChecks": null, + "matchUpdateTypes": ["minor", "patch"] + } + ] +} diff --git a/.github/renovate/commitMessage.json5 b/.github/renovate/commitMessage.json5 new file mode 100644 index 00000000..a69173fe --- /dev/null +++ b/.github/renovate/commitMessage.json5 @@ -0,0 +1,15 @@ +{ + "commitMessageTopic": "{{depName}}", + "commitMessageExtra": "to {{newVersion}}", + "commitMessageSuffix": "", + "packageRules": [ + { + "matchDatasources": ["helm"], + "commitMessageTopic": "chart {{depName}}" + }, + { + "matchDatasources": ["docker"], + "commitMessageTopic": "image {{depName}}" + } + ] +} diff --git a/.github/renovate/labels.json5 b/.github/renovate/labels.json5 new file mode 100644 index 00000000..48a59a55 --- /dev/null +++ b/.github/renovate/labels.json5 @@ -0,0 +1,40 @@ +{ + "packageRules": [ + { + "matchUpdateTypes": ["major"], + "labels": ["type/major"] + }, + { + "matchUpdateTypes": ["minor"], + "labels": ["type/minor"] + }, + { + "matchUpdateTypes": ["patch"], + "labels": ["type/patch"] + }, + { + "matchDatasources": ["docker"], + "addLabels": ["renovate/container"] + }, + { + "matchDatasources": ["helm"], + "addLabels": ["renovate/helm"] + }, + { + "matchDatasources": ["galaxy", "galaxy-collection"], + "addLabels": ["renovate/ansible"] + }, + { + "matchDatasources": ["terraform-provider"], + "addLabels": ["renovate/terraform"] + }, + { + "matchDatasources": ["github-releases", "github-tags"], + "addLabels": ["renovate/github-release"] + }, + { + "matchManagers": ["github-actions"], + "addLabels": ["renovate/github-action"] + } + ] +} diff --git a/.github/renovate/semanticCommits.json5 b/.github/renovate/semanticCommits.json5 new file mode 100644 index 00000000..867c29aa --- /dev/null +++ b/.github/renovate/semanticCommits.json5 @@ -0,0 +1,114 @@ +{ + "packageRules": [ + { + "matchDatasources": ["docker"], + "matchUpdateTypes": ["major"], + "commitMessagePrefix": "feat(container)!: " + }, + { + "matchDatasources": ["docker"], + "matchUpdateTypes": ["minor"], + "semanticCommitType": "feat", + "semanticCommitScope": "container" + }, + { + "matchDatasources": ["docker"], + "matchUpdateTypes": ["patch"], + "semanticCommitType": "fix", + "semanticCommitScope": "container" + }, + { + "matchDatasources": ["docker"], + "matchUpdateTypes": ["digest"], + "semanticCommitType": "chore", + "semanticCommitScope": "container" + }, + { + "matchDatasources": ["helm"], + "matchUpdateTypes": ["major"], + "commitMessagePrefix": "feat(helm)!: " + }, + { + "matchDatasources": ["helm"], + "matchUpdateTypes": ["minor"], + "semanticCommitType": "feat", + "semanticCommitScope": "helm" + }, + + { + "matchDatasources": ["helm"], + "matchUpdateTypes": ["patch"], + "semanticCommitType": "fix", + "semanticCommitScope": "helm" + }, + { + "matchDatasources": ["galaxy", "galaxy-collection"], + "matchUpdateTypes": ["major"], + "commitMessagePrefix": "feat(ansible)!: " + }, + { + "matchDatasources": ["galaxy", "galaxy-collection"], + "matchUpdateTypes": ["minor"], + "semanticCommitType": "feat", + "semanticCommitScope": "ansible" + }, + + { + "matchDatasources": ["galaxy", "galaxy-collection"], + "matchUpdateTypes": ["patch"], + "semanticCommitType": "fix", + "semanticCommitScope": "ansible" + }, + { + "matchDatasources": ["terraform-provider"], + "matchUpdateTypes": ["major"], + "commitMessagePrefix": "feat(terraform)!: " + }, + { + "matchDatasources": ["terraform-provider"], + "matchUpdateTypes": ["minor"], + "semanticCommitType": "feat", + "semanticCommitScope": "terraform" + }, + { + "matchDatasources": ["terraform-provider"], + "matchUpdateTypes": ["patch"], + "semanticCommitType": "fix", + "semanticCommitScope": "terraform" + }, + { + "matchDatasources": ["github-releases", "github-tags"], + "matchUpdateTypes": ["major"], + "commitMessagePrefix": "feat(github-release)!: " + }, + { + "matchDatasources": ["github-releases", "github-tags"], + "matchUpdateTypes": ["minor"], + "semanticCommitType": "feat", + "semanticCommitScope": "github-release" + }, + { + "matchDatasources": ["github-releases", "github-tags"], + "matchUpdateTypes": ["patch"], + "semanticCommitType": "fix", + "semanticCommitScope": "github-release" + }, + { + "matchManagers": ["github-actions"], + "matchUpdateTypes": ["major"], + "commitMessagePrefix": "feat(github-action)!: " + }, + { + "matchManagers": ["github-actions"], + "matchUpdateTypes": ["minor"], + "semanticCommitType": "feat", + "semanticCommitScope": "github-action" + }, + { + "matchManagers": ["github-actions"], + "matchUpdateTypes": ["patch"], + "semanticCommitType": "fix", + "semanticCommitScope": "github-action" + } + ] +} diff --git a/.github/workflows/link-checker.yaml b/.github/workflows/link-check.yaml similarity index 65% rename from .github/workflows/link-checker.yaml rename to .github/workflows/link-check.yaml index ed5e1f0c..b960c3eb 100644 --- a/.github/workflows/link-checker.yaml +++ b/.github/workflows/link-check.yaml @@ -1,24 +1,39 @@ --- -name: "Link Checker" +name: "Link Check" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 * * * *" jobs: - link-checker: - name: Link Checker + link-check: + name: Link Check runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0 + - name: Restore lychee cache + uses: actions/cache@c1a5de879eb890d062a85ee0252d6036480b1fe2 # v3.2.1 + with: + path: .lycheecache + key: cache-lychee-${{ github.sha }} + restore-keys: cache-lychee- + - name: Link Checker uses: lycheeverse/lychee-action@4dcb8bee2a0a4531cba1a1f392c54e8375d6dd81 # renovate: tag=v1.5.4 id: lychee env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + with: + args: > + --cache + --max-cache-age 1d + --verbose + --no-progress + --exclude-mail + './**/*.md' - name: Find Link Checker Issue id: link-checker-issue @@ -31,7 +46,7 @@ jobs: - name: Update Issue uses: peter-evans/create-issue-from-file@433e51abf769039ee20ba1293a088ca19d573b7f # renovate: tag=v4.0.1 with: - title: Broken links detected in docs 🔗 + title: Broken links detected 🔗 issue-number: "${{ steps.link-checker-issue.outputs.issue-number }}" content-filepath: ./lychee/out.md token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.lycheeignore b/.lycheeignore new file mode 100644 index 00000000..e69de29b