Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
Signed-off-by: Heathcliff <[email protected]>
  • Loading branch information
heathcliff26 committed Dec 31, 2023
0 parents commit 260e001
Show file tree
Hide file tree
Showing 788 changed files with 330,364 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
indent_size = 4

[*.{yaml,yml}]
indent_style = space
indent_size = 2

[*.{json,json5}]
indent_style = space
indent_size = 2

[*.sh]
indent_style = space
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Default owner
* @heathcliff26
5 changes: 5 additions & 0 deletions .github/renovate-bot.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"username": "bot-ahsoka[bot]",
"gitAuthor": "bot-ahsoka[bot] <bot-ahsoka[bot]@users.noreply.github.com>",
}
24 changes: 24 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended",
"docker:enableMajor",
":disableRateLimiting",
":dependencyDashboard",
":semanticCommits",
":automergeDigest",
":automergeBranch",
"github>heathcliff26/containers//.github/renovate/autoMerge.json5",
"github>heathcliff26/containers//.github/renovate/commitMessage.json5",
"github>heathcliff26/containers//.github/renovate/customManagers.json5",
"github>heathcliff26/containers//.github/renovate/groups.json5",
"github>heathcliff26/containers//.github/renovate/labels.json5",
"github>heathcliff26/containers//.github/renovate/semanticCommits.json5",
"helpers:pinGitHubActionDigests"
],
"platform": "github",
"assigneesFromCodeOwners": true,
"dependencyDashboardTitle": "Renovate Dashboard 🤖",
"suppressNotifications": ["prIgnoreNotification"],
"ignoreTests": true,
}
21 changes: 21 additions & 0 deletions .github/renovate/autoMerge.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"packageRules": [
{
"description": "Auto merge GitHub Actions",
"matchManagers": ["github-actions"],
"matchDatasources": ["github-tags"],
"automerge": true,
"automergeType": "branch",
"matchUpdateTypes": ["minor", "patch"]
},
{
"description": "Auto merge GitHub Actions (Docker)",
"matchDatasources": ["docker"],
"matchFileNames": [".github/workflows/*.yaml", ".github/workflows/*.yml"],
"automerge": true,
"automergeType": "branch",
"matchUpdateTypes": ["minor", "patch"]
},
]
}
12 changes: 12 additions & 0 deletions .github/renovate/commitMessage.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": "to {{newVersion}}",
"commitMessageSuffix": "",
"packageRules": [
{
"matchDatasources": ["docker"],
"commitMessageTopic": "image {{depName}}"
}
]
}
27 changes: 27 additions & 0 deletions .github/renovate/customManagers.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"customManagers": [
{
"customType": "regex",
"description": "Extract Dockerfile dependencies from Enviroment Variables",
"fileMatch": [
"(^|/)Dockerfile$",
"(^|/)Dockerfile\\.[^/]*$"
],
"matchStrings": [
"#\\srenovate:\\sdatasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?( extractVersion=(?<extractVersion>.*?))?\\s(ENV|ARG) .*?_VERSION=(?<currentValue>.*)\\s"
]
},
{
"customType": "regex",
"description": "Process docker:// actions for github workflow",
"fileMatch": [
".github/workflows/.+\\.ya?ml$",
],
"matchStrings": [
"uses: docker://(?<depName>.*?):(?<currentValue>.*)"
],
"datasourceTemplate": "docker",
}
]
}
11 changes: 11 additions & 0 deletions .github/renovate/groups.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"packageRules": [
{
"groupName": "all non-major dependencies",
"groupSlug": "all-minor-patch",
"matchPackagePatterns": ["*"],
"matchUpdateTypes": ["minor", "patch"]
}
]
}
33 changes: 33 additions & 0 deletions .github/renovate/labels.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"packageRules": [
{
"matchUpdateTypes": ["major"],
"labels": ["type/major"]
},
{
"matchUpdateTypes": ["minor"],
"labels": ["type/minor"]
},
{
"matchUpdateTypes": ["patch"],
"labels": ["type/patch"]
},
{
"matchUpdateTypes": ["digest"],
"labels": ["type/digest"]
},
{
"matchDatasources": ["docker"],
"addLabels": ["renovate/container"]
},
{
"matchDatasources": ["github-releases", "github-tags"],
"addLabels": ["renovate/github-release"]
},
{
"matchManagers": ["github-actions"],
"addLabels": ["renovate/github-action"]
}
]
}
62 changes: 62 additions & 0 deletions .github/renovate/semanticCommits.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"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": ["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"
}
]
}
49 changes: 49 additions & 0 deletions .github/workflows/broken-link-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
name: "Broken Link Check"

on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 0"

jobs:
check-links:
name: Check Links
runs-on: ubuntu-latest
steps:
- name: Generate Token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
id: generate-token
with:
app_id: "${{ secrets.BOT_APP_ID }}"
private_key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"

- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
token: "${{ steps.generate-token.outputs.token }}"

- name: Scan for broken links
uses: lycheeverse/lychee-action@ec3ed119d4f44ad2673a7232460dc7dff59d2421 # v1.8.0
id: lychee
env:
GITHUB_TOKEN: "${{ steps.generate-token.outputs.token }}"
with:
args: --verbose --no-progress --exclude-mail './**/*.md'

- name: Find Link Checker Issue
id: broken-link-check-issue
uses: micalevisk/last-issue-action@0d40124cc99ac8601c2516007f0c98ef3d27537b # v2.3.0
with:
state: open
labels: broken-links
token: "${{ steps.generate-token.outputs.token }}"

- name: Update Issue
uses: peter-evans/create-issue-from-file@433e51abf769039ee20ba1293a088ca19d573b7f # v4.0.1
with:
title: Broken links detected 🔗
issue-number: "${{ steps.broken-link-check-issue.outputs.issue-number }}"
content-filepath: ./lychee/out.md
token: "${{ steps.generate-token.outputs.token }}"
labels: broken-links
20 changes: 20 additions & 0 deletions .github/workflows/editorconfig-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: "Editorconfig Check"

on:
workflow_dispatch:
pull_request:
branches: ["main"]

jobs:
check-editorconfig:
name: Run editorconfig-checker
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Run editorconfig-checker
uses: docker://mstruebing/editorconfig-checker:2.7.2
with:
args: ec --exclude="\.git\/(.*)|(.*)\/?vendor\/(.*)"
65 changes: 65 additions & 0 deletions .github/workflows/go-testcover-report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
name: "Generate go test cover report"

on:
workflow_dispatch:
push:
branches: ["main"]
paths:
- "**/*.go"

jobs:
generate-reports:
name: Generate reports
runs-on: ubuntu-latest
steps:
- name: Generate Token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
id: generate-token
with:
app_id: "${{ secrets.BOT_APP_ID }}"
private_key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"

- name: Checkout main branch
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
token: "${{ steps.generate-token.outputs.token }}"
ref: "main"
path: "main"

- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: 'stable'

- name: Generate reports
run: |
${GITHUB_WORKSPACE}/main/hack/coverprofile.sh
- name: Checkout gh-pages
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
token: "${{ steps.generate-token.outputs.token }}"
ref: "gh-pages"
path: "gh-pages"

- name: Copy files to gh-pages
run: |
set -e
cp ${GITHUB_WORKSPACE}/main/coverprofiles/* ${GITHUB_WORKSPACE}/gh-pages/
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5.0.0
with:
commit_message: |
Updated go coverprofiles
Commit: ${{ github.sha }}
commit_options: "--signoff"
repository: "./gh-pages"
commit_user_name: "bot-ahsoka[bot]"
commit_user_email: "<bot-ahsoka[bot]@users.noreply.github.com>"
commit_author: "bot-ahsoka[bot] <bot-ahsoka[bot]@users.noreply.github.com>"
skip_dirty_check: false
skip_fetch: true
skip_checkout: true

28 changes: 28 additions & 0 deletions .github/workflows/label-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

---
name: "Labels Check"

on:
workflow_dispatch:
pull_request:
branches: ["main"]
types:
- opened
- synchronize
- reopened
- labeled
- unlabeled

jobs:
check-labels:
name: Check Labels
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- name: Check for do-not-merge
id: do-not-merge
uses: docker://agilepathway/pull-request-label-checker:v1.6.13
with:
repo_token: ${{ github.token }}
none_of: do-not-merge
Loading

0 comments on commit 260e001

Please sign in to comment.