mirror of
https://github.com/plcnk/charts.git
synced 2026-04-05 17:22:21 +00:00
feat(charts): Now using bjw-s's common library chart (#7)
This commit is contained in:
committed by
GitHub
parent
8a84b5e13a
commit
31bbf1ca94
1
.github/CODEOWNERS
vendored
Normal file
1
.github/CODEOWNERS
vendored
Normal file
@ -0,0 +1 @@
|
||||
* @plcnk
|
||||
15
.github/renovate.json5
vendored
15
.github/renovate.json5
vendored
@ -16,21 +16,6 @@
|
||||
{
|
||||
"matchDatasources": ["helm"],
|
||||
"commitMessageTopic": "{{depName}} Helm release"
|
||||
},
|
||||
{
|
||||
"matchDatasources": ["docker"],
|
||||
"matchPackageNames": ["ghcr.io/dgtlmoon/changedetection.io"],
|
||||
"versioning": "loose"
|
||||
},
|
||||
{
|
||||
"matchDatasources": ["docker"],
|
||||
"matchPackageNames": ["ghcr.io/juanfont/headscale"],
|
||||
"allowedVersions": "!/^0.23.0$/"
|
||||
},
|
||||
{
|
||||
"matchDatasources": ["docker"],
|
||||
"matchPackageNames": ["eqalpha/keydb"],
|
||||
"versioning": "regex:^(?<compatability>.+?)_v(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)$"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
115
.github/workflows/renovate.yaml
vendored
Normal file
115
.github/workflows/renovate.yaml
vendored
Normal file
@ -0,0 +1,115 @@
|
||||
name: Renovate
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- renovate/**
|
||||
|
||||
env:
|
||||
COMMIT_MESSAGE: "chore: Update chart metadata"
|
||||
|
||||
jobs:
|
||||
update-chart-metadata:
|
||||
name: Update Chart Metadata
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
AUTHOR_USER: chart-bot
|
||||
AUTHOR_EMAIL: 160046936+charts-bot[bot]@users.noreply.github.com
|
||||
steps:
|
||||
- name: Generate Token
|
||||
id: app-token
|
||||
uses: actions/create-github-app-token@v1
|
||||
with:
|
||||
app-id: ${{ secrets.BOT_APP_ID }}
|
||||
private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ steps.app-token.outputs.token }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Detect Changes
|
||||
uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
with:
|
||||
list-files: shell
|
||||
filters: |
|
||||
charts:
|
||||
- charts/**
|
||||
|
||||
- name: Fetch PR
|
||||
id: pr
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ steps.app-token.outputs.token }}
|
||||
script: |
|
||||
const response = await github.rest.repos.listPullRequestsAssociatedWithCommit({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
commit_sha: context.sha,
|
||||
});
|
||||
const pr = response.data.shift();
|
||||
core.setOutput("title", pr.title);
|
||||
core.setOutput("base_ref", pr.base.ref);
|
||||
core.setOutput("labels", pr.labels.map((e) => e.name).filter((e) => e));
|
||||
|
||||
- name: Update changelog
|
||||
env:
|
||||
TITLE: ${{ steps.pr.outputs.title }}
|
||||
CHANGELOG_APPEND: ${{ contains(steps.pr.outputs.labels, 'changelog-append') }}
|
||||
BREAKING_CHANGE: ${{ contains(steps.pr.outputs.labels, 'breaking-change') }}
|
||||
run: |
|
||||
set -eux
|
||||
export DESCRIPTION="$(perl -pe 's/^.+?: (.)/\U$1/' <<<"$TITLE")"
|
||||
if [[ "$BREAKING_CHANGE" == "true" ]]; then
|
||||
DESCRIPTION="BREAKING - $DESCRIPTION"
|
||||
fi
|
||||
CHANGELOG="$(yq -o json '[{"kind": "changed", "description": strenv(DESCRIPTION)}]')"
|
||||
UPDATE_TYPE=replace
|
||||
if [[ "$CHANGELOG_APPEND" == "true" ]]; then
|
||||
UPDATE_TYPE=append
|
||||
fi
|
||||
./hack/update-changelog.sh "$UPDATE_TYPE" "$CHANGELOG" ${{ steps.changes.outputs.charts_files }}
|
||||
|
||||
- name: Set type to patch
|
||||
if: contains(steps.pr.outputs.labels, 'patch') || contains(steps.pr.outputs.labels, 'digest')
|
||||
run: echo TYPE=patch >>$GITHUB_ENV
|
||||
- name: Set type to minor
|
||||
if: contains(steps.pr.outputs.labels, 'major') || contains(steps.pr.outputs.labels, 'minor')
|
||||
run: echo TYPE=minor >>$GITHUB_ENV
|
||||
- name: Update chart version
|
||||
if: "!contains(steps.pr.outputs.labels, 'skip-version-bump')"
|
||||
run: |
|
||||
set -eux
|
||||
./hack/update-version.sh "$TYPE" ${{ steps.changes.outputs.charts_files }}
|
||||
|
||||
- name: Install helm-docs
|
||||
uses: gabe565/setup-helm-docs-action@v1
|
||||
- name: Generate Helm docs
|
||||
run: |
|
||||
set -eu
|
||||
./hack/gen-helm-docs.sh
|
||||
|
||||
- name: Check if commit exists
|
||||
id: commit_exists
|
||||
env:
|
||||
BASE_REF: ${{ steps.pr.outputs.base_ref }}
|
||||
run: |
|
||||
set -eu
|
||||
IFS=$'\n\t'
|
||||
commits="$(git rev-list --pretty=oneline "origin/$BASE_REF..HEAD" | cut -d' ' -f2-)"
|
||||
if grep -F -e "$COMMIT_MESSAGE" <<<"$commits"; then
|
||||
echo 'result=true' >>$GITHUB_OUTPUT
|
||||
else
|
||||
echo 'result=false' >>$GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Commit chart version
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
if: steps.commit_exists.outputs.result == 'false' && !contains(steps.pr.outputs.labels, 'skip-chart-meta')
|
||||
with:
|
||||
commit_user_name: ${{ env.AUTHOR_USER }}
|
||||
commit_user_email: ${{ env.AUTHOR_EMAIL }}
|
||||
commit_author: ${{ env.AUTHOR_USER }} <${{ env.AUTHOR_EMAIL }}>
|
||||
commit_message: ${{ env.COMMIT_MESSAGE }}
|
||||
Reference in New Issue
Block a user