mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-01-23 23:49:12 +00:00
ci: Restructure reusable workflows
Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
This commit is contained in:
parent
2a58efa68e
commit
998aa05027
20
.github/label-commenter-config.yml
vendored
20
.github/label-commenter-config.yml
vendored
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
labels:
|
labels:
|
||||||
- name: kind:incomplete-template
|
- name: incomplete-template
|
||||||
labeled:
|
labeled:
|
||||||
issue:
|
issue:
|
||||||
body: |
|
body: |
|
||||||
@ -9,7 +9,7 @@ labels:
|
|||||||
locking: lock
|
locking: lock
|
||||||
lock_reason: resolved
|
lock_reason: resolved
|
||||||
|
|
||||||
- name: kind:support
|
- name: support
|
||||||
labeled:
|
labeled:
|
||||||
issue:
|
issue:
|
||||||
body: |
|
body: |
|
||||||
@ -22,7 +22,7 @@ labels:
|
|||||||
- [GitHub Discussions](https://github.com/k8s-at-home/organization/discussions)
|
- [GitHub Discussions](https://github.com/k8s-at-home/organization/discussions)
|
||||||
action: close
|
action: close
|
||||||
|
|
||||||
- name: kind:incomplete-docs
|
- name: incomplete-docs
|
||||||
labeled:
|
labeled:
|
||||||
pr:
|
pr:
|
||||||
body: |
|
body: |
|
||||||
@ -33,17 +33,3 @@ labels:
|
|||||||
- `version` in `Chart.yaml` has been updated per [semver](http://semver.org/)
|
- `version` in `Chart.yaml` has been updated per [semver](http://semver.org/)
|
||||||
- The `artifacthub.io/changes` chart annotation contains a summary of the updates for this new version. ([Artifact Hub documentation](https://artifacthub.io/docs/topics/annotations/helm/#supported-annotations))
|
- The `artifacthub.io/changes` chart annotation contains a summary of the updates for this new version. ([Artifact Hub documentation](https://artifacthub.io/docs/topics/annotations/helm/#supported-annotations))
|
||||||
- [Documentation strings](https://github.com/norwoodj/helm-docs#valuesyaml-metadata) have been added to the keys in `values.yaml`.
|
- [Documentation strings](https://github.com/norwoodj/helm-docs#valuesyaml-metadata) have been added to the keys in `values.yaml`.
|
||||||
|
|
||||||
Afterwards you can run `./hack/gen-helm-docs.sh stable <chart>` again to update the chart's `README.md` file.
|
|
||||||
|
|
||||||
- name: kind:incorrect-title
|
|
||||||
labeled:
|
|
||||||
pr:
|
|
||||||
body: |
|
|
||||||
:wave: @{{ pull_request.user.login }}, thanks for taking the time to submit this PR. 🙏🏽
|
|
||||||
|
|
||||||
We have noticed that the PR title does not adhere to our desired format.
|
|
||||||
Could you please make sure that it follows the pattern `[<lowercase chart name>] <Update description>`?
|
|
||||||
Example: `[radarr] Update image version`.
|
|
||||||
|
|
||||||
Thanks!
|
|
||||||
|
22
.github/renovate.json5
vendored
22
.github/renovate.json5
vendored
@ -34,23 +34,23 @@
|
|||||||
"branchTopic": "{{{parentDir}}}-{{{depNameSanitized}}}-{{{newMajor}}}{{#if isPatch}}.{{{newMinor}}}{{/if}}.x{{#if isLockfileUpdate}}-lockfile{{/if}}",
|
"branchTopic": "{{{parentDir}}}-{{{depNameSanitized}}}-{{{newMajor}}}{{#if isPatch}}.{{{newMinor}}}{{/if}}.x{{#if isLockfileUpdate}}-lockfile{{/if}}",
|
||||||
"updateTypes": ["major"],
|
"updateTypes": ["major"],
|
||||||
"bumpVersion": "major",
|
"bumpVersion": "major",
|
||||||
"labels": ["dependency/major"],
|
"labels": ["type/major"],
|
||||||
"packageNames": ["common"],
|
"packageNames": ["common"],
|
||||||
"groupName": ["internal major dep"]
|
"groupName": ["common library major"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"updateTypes": ["minor"],
|
"updateTypes": ["minor"],
|
||||||
"bumpVersion": "minor",
|
"bumpVersion": "minor",
|
||||||
"labels": ["dependency/minor"],
|
"labels": ["type/minor"],
|
||||||
"packageNames": ["common"],
|
"packageNames": ["common"],
|
||||||
"groupName": ["internal minor dep"]
|
"groupName": ["common library minor"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"updateTypes": ["patch"],
|
"updateTypes": ["patch"],
|
||||||
"bumpVersion": "patch",
|
"bumpVersion": "patch",
|
||||||
"labels": ["dependency/patch"],
|
"labels": ["type/patch"],
|
||||||
"packageNames": ["common"],
|
"packageNames": ["common"],
|
||||||
"groupName": ["internal patch dep"]
|
"groupName": ["common library patch"]
|
||||||
},
|
},
|
||||||
//
|
//
|
||||||
// Other library deps
|
// Other library deps
|
||||||
@ -60,7 +60,7 @@
|
|||||||
"branchTopic": "{{{parentDir}}}-{{{depNameSanitized}}}-{{{newMajor}}}{{#if isPatch}}.{{{newMinor}}}{{/if}}.x{{#if isLockfileUpdate}}-lockfile{{/if}}",
|
"branchTopic": "{{{parentDir}}}-{{{depNameSanitized}}}-{{{newMajor}}}{{#if isPatch}}.{{{newMinor}}}{{/if}}.x{{#if isLockfileUpdate}}-lockfile{{/if}}",
|
||||||
"updateTypes": ["major"],
|
"updateTypes": ["major"],
|
||||||
"bumpVersion": "major",
|
"bumpVersion": "major",
|
||||||
"labels": ["dependency/major"],
|
"labels": ["type/major"],
|
||||||
"excludePackageNames": ["common"],
|
"excludePackageNames": ["common"],
|
||||||
"schedule": [
|
"schedule": [
|
||||||
"every 3 months on the first day of the month"
|
"every 3 months on the first day of the month"
|
||||||
@ -69,9 +69,9 @@
|
|||||||
{
|
{
|
||||||
"updateTypes": ["minor"],
|
"updateTypes": ["minor"],
|
||||||
"bumpVersion": "minor",
|
"bumpVersion": "minor",
|
||||||
"labels": ["dependency/minor"],
|
"labels": ["type/minor"],
|
||||||
"excludePackageNames": ["common"],
|
"excludePackageNames": ["common"],
|
||||||
"groupName": ["external minor dep"],
|
"groupName": ["external dependency minor"],
|
||||||
"schedule": [
|
"schedule": [
|
||||||
"every 2 months on the first day of the month"
|
"every 2 months on the first day of the month"
|
||||||
]
|
]
|
||||||
@ -79,9 +79,9 @@
|
|||||||
{
|
{
|
||||||
"updateTypes": ["patch"],
|
"updateTypes": ["patch"],
|
||||||
"bumpVersion": "patch",
|
"bumpVersion": "patch",
|
||||||
"labels": ["dependency/patch"],
|
"labels": ["type/patch"],
|
||||||
"excludePackageNames": ["common"],
|
"excludePackageNames": ["common"],
|
||||||
"groupName": ["external patch dep"],
|
"groupName": ["external dependency patch"],
|
||||||
"schedule": [
|
"schedule": [
|
||||||
"every 1 months on the first day of the month"
|
"every 1 months on the first day of the month"
|
||||||
]
|
]
|
||||||
|
@ -13,9 +13,6 @@ jobs:
|
|||||||
name: Label CI status
|
name: Label CI status
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Generate Token
|
- name: Generate Token
|
||||||
uses: tibdex/github-app-token@v1
|
uses: tibdex/github-app-token@v1
|
||||||
id: generate-token
|
id: generate-token
|
||||||
@ -23,12 +20,18 @@ jobs:
|
|||||||
app_id: ${{ secrets.K8S_AT_HOME_APP_ID }}
|
app_id: ${{ secrets.K8S_AT_HOME_APP_ID }}
|
||||||
private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }}
|
private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }}
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
|
|
||||||
- name: Download workflow artifact
|
- name: Download workflow artifact
|
||||||
uses: dawidd6/action-download-artifact@v2.11.0
|
uses: dawidd6/action-download-artifact@v2.11.0
|
||||||
with:
|
with:
|
||||||
github_token: ${{ steps.generate-token.outputs.token }}
|
github_token: ${{ steps.generate-token.outputs.token }}
|
||||||
workflow: pr-validate.yaml
|
workflow: pr-validate.yaml
|
||||||
name: pr_metadata
|
name: pr_metadata
|
||||||
|
path: ./pr_metadata
|
||||||
|
|
||||||
- name: Read the pr_number file
|
- name: Read the pr_number file
|
||||||
id: pr_num_reader
|
id: pr_num_reader
|
||||||
|
66
.github/workflows/metadata-label-commenter.yaml
vendored
66
.github/workflows/metadata-label-commenter.yaml
vendored
@ -1,38 +1,38 @@
|
|||||||
# ---
|
---
|
||||||
# name: "Metadata: Label Commenter"
|
name: "Metadata: Label Commenter"
|
||||||
|
|
||||||
# on:
|
on:
|
||||||
# issues:
|
issues:
|
||||||
# types:
|
types:
|
||||||
# - labeled
|
- labeled
|
||||||
# - unlabeled
|
- unlabeled
|
||||||
# pull_request_target:
|
pull_request_target:
|
||||||
# types:
|
types:
|
||||||
# - labeled
|
- labeled
|
||||||
# - unlabeled
|
- unlabeled
|
||||||
|
|
||||||
# permissions:
|
permissions:
|
||||||
# contents: read
|
contents: read
|
||||||
# issues: write
|
issues: write
|
||||||
# pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
# jobs:
|
jobs:
|
||||||
# comment:
|
comment:
|
||||||
# name: Label commenter
|
name: Label commenter
|
||||||
# runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
# steps:
|
steps:
|
||||||
# - name: Generate Token
|
- name: Generate Token
|
||||||
# uses: tibdex/github-app-token@v1
|
uses: tibdex/github-app-token@v1
|
||||||
# id: generate-token
|
id: generate-token
|
||||||
# with:
|
with:
|
||||||
# app_id: ${{ secrets.K8S_AT_HOME_APP_ID }}
|
app_id: ${{ secrets.K8S_AT_HOME_APP_ID }}
|
||||||
# private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }}
|
private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }}
|
||||||
|
|
||||||
# - uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
# with:
|
with:
|
||||||
# token: ${{ steps.generate-token.outputs.token }}
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
# ref: master
|
ref: master
|
||||||
|
|
||||||
# - uses: peaceiris/actions-label-commenter@v1
|
- uses: peaceiris/actions-label-commenter@v1
|
||||||
# with:
|
with:
|
||||||
# github_token: ${{ steps.generate-token.outputs.token }}
|
github_token: ${{ steps.generate-token.outputs.token }}
|
||||||
|
72
.github/workflows/metadata-label-issues-prs.yaml
vendored
72
.github/workflows/metadata-label-issues-prs.yaml
vendored
@ -1,72 +0,0 @@
|
|||||||
# ---
|
|
||||||
# name: "Metadata: Label issues and pull requests"
|
|
||||||
|
|
||||||
# on:
|
|
||||||
# issues:
|
|
||||||
# types:
|
|
||||||
# - opened
|
|
||||||
# - edited
|
|
||||||
# - closed
|
|
||||||
# - reopened
|
|
||||||
# pull_request_target:
|
|
||||||
# types:
|
|
||||||
# - opened
|
|
||||||
# - edited
|
|
||||||
# - closed
|
|
||||||
# - reopened
|
|
||||||
# - ready_for_review
|
|
||||||
# - synchronize
|
|
||||||
|
|
||||||
# jobs:
|
|
||||||
# label:
|
|
||||||
# name: Label issues and pull requests
|
|
||||||
# runs-on: ubuntu-20.04
|
|
||||||
# steps:
|
|
||||||
# - name: Generate Token
|
|
||||||
# uses: tibdex/github-app-token@v1
|
|
||||||
# id: generate-token
|
|
||||||
# with:
|
|
||||||
# app_id: ${{ secrets.K8S_AT_HOME_APP_ID }}
|
|
||||||
# private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }}
|
|
||||||
|
|
||||||
# - uses: Videndum/label-mastermind@2.1.3
|
|
||||||
# with:
|
|
||||||
# GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|
|
||||||
# configJSON: |
|
|
||||||
# {
|
|
||||||
# "releaseMastermind": {
|
|
||||||
# "labels": {
|
|
||||||
# "kind:incorrect-title": {
|
|
||||||
# "name": "kind:incorrect-title",
|
|
||||||
# "colour": "#ffb700",
|
|
||||||
# "description": "Incorrect title"
|
|
||||||
# }
|
|
||||||
# },
|
|
||||||
# "runners": [
|
|
||||||
# {
|
|
||||||
# "root": ".",
|
|
||||||
# "versioning": {
|
|
||||||
# "source": "milestones",
|
|
||||||
# "type": "other"
|
|
||||||
# },
|
|
||||||
# "pr": {
|
|
||||||
# "labels": {
|
|
||||||
# "kind:incorrect-title": {
|
|
||||||
# "requires": 2,
|
|
||||||
# "conditions": [
|
|
||||||
# {
|
|
||||||
# "type": "creatorMatches",
|
|
||||||
# "pattern": "^(?!renovate).+"
|
|
||||||
# },
|
|
||||||
# {
|
|
||||||
# "type": "titleMatches",
|
|
||||||
# "pattern": "^(?!\\[[a-z0-9\\-]+\\]\\s.+).+"
|
|
||||||
# }
|
|
||||||
# ]
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# ]
|
|
||||||
# }
|
|
||||||
# }
|
|
39
.github/workflows/metadata-label-pr.yaml
vendored
Normal file
39
.github/workflows/metadata-label-pr.yaml
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
---
|
||||||
|
name: "Metadata: Label pull requests"
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- edited
|
||||||
|
- closed
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
- synchronize
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
label-size:
|
||||||
|
name: Label Size
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Generate Token
|
||||||
|
uses: tibdex/github-app-token@v1
|
||||||
|
id: generate-token
|
||||||
|
with:
|
||||||
|
app_id: ${{ secrets.K8S_AT_HOME_APP_ID }}
|
||||||
|
private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }}
|
||||||
|
|
||||||
|
- name: Label Size
|
||||||
|
uses: pascalgn/size-label-action@v0.4.3
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: "${{ steps.generate-token.outputs.token }}"
|
||||||
|
with:
|
||||||
|
sizes: >
|
||||||
|
{
|
||||||
|
"0": "XS",
|
||||||
|
"20": "S",
|
||||||
|
"50": "M",
|
||||||
|
"200": "L",
|
||||||
|
"800": "XL",
|
||||||
|
"2000": "XXL"
|
||||||
|
}
|
4
.github/workflows/pr-validate.yaml
vendored
4
.github/workflows/pr-validate.yaml
vendored
@ -11,7 +11,7 @@ concurrency:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pr-metadata:
|
pr-metadata:
|
||||||
uses: k8s-at-home/charts/.github/workflows/pr-get-metadata.yaml@master
|
uses: k8s-at-home/charts/.github/workflows/pr-metadata.yaml@master
|
||||||
|
|
||||||
pre-commit-check:
|
pre-commit-check:
|
||||||
uses: k8s-at-home/charts/.github/workflows/pre-commit-check.yaml@master
|
uses: k8s-at-home/charts/.github/workflows/pre-commit-check.yaml@master
|
||||||
@ -21,7 +21,7 @@ jobs:
|
|||||||
modifiedFiles: ${{ needs.pr-metadata.outputs.addedOrModifiedFiles }}
|
modifiedFiles: ${{ needs.pr-metadata.outputs.addedOrModifiedFiles }}
|
||||||
|
|
||||||
charts-readme:
|
charts-readme:
|
||||||
uses: k8s-at-home/charts/.github/workflows/charts-update-readme.yaml@master
|
uses: k8s-at-home/charts/.github/workflows/charts-readme.yaml@master
|
||||||
needs:
|
needs:
|
||||||
- pr-metadata
|
- pr-metadata
|
||||||
- pre-commit-check
|
- pre-commit-check
|
||||||
|
Loading…
Reference in New Issue
Block a user