Compare commits

...

12 Commits

Author SHA1 Message Date
Gitea Actions 8782975bde feat(action): allow automerge of azure/k8s-deploy v7.* (#109)
CD / Release (push) Successful in 9s
Allow Renovate to automerge updates matching:

- **Ecosystem:** `action`
- **Package:** `azure/k8s-deploy`
- **Update type:** `major`
- **New value:** `v7.*`

Automerge major updates for azure/k8s-deploy to v7

---------

Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-authored-by: gitea-actions <gitea-actions@noreply.local>
Reviewed-on: #109
Co-authored-by: Gitea Actions <-2+gitea-actions@noreply.localhost>
Co-committed-by: Gitea Actions <-2+gitea-actions@noreply.localhost>
2026-07-24 19:10:02 +02:00
t.behrendt 4f76a5c5d1 Revert "ci(autobump): switch to renovate-bot token when creating PR (#107)" (#108)
This reverts commit 12df555caf.

Reviewed-on: #108
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2026-07-24 18:59:18 +02:00
t.behrendt 12df555caf ci(autobump): switch to renovate-bot token when creating PR (#107)
Reviewed-on: #107
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2026-07-24 18:51:25 +02:00
t.behrendt 74c24bfec4 ci: run ci on every push to non-main (#105)
Reviewed-on: #105
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2026-07-24 18:43:54 +02:00
t.behrendt 1f6f058e06 ci: only rlease on changes in renovate configs (#104)
Reviewed-on: #104
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2026-07-24 18:42:57 +02:00
t.behrendt 1734e79a40 ci: add workflow to add autobumps (#102)
CD / Release (push) Successful in 56s
Reviewed-on: #102
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2026-07-24 18:32:35 +02:00
t.behrendt 832b956560 feat(actions): allow automerge of actions/setup-go v7 (#101)
CD / Release (push) Successful in 46s
Reviewed-on: #101
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2026-07-23 21:22:40 +02:00
t.behrendt f9b9763a3c feat(actions): allow automerge of actions/setup-node v7 (#99)
CD / Release (push) Successful in 5s
Reviewed-on: #99
Co-authored-by: t.behrendt <t.behrendt@t00n.de>
Co-committed-by: t.behrendt <t.behrendt@t00n.de>
2026-07-21 07:48:38 +02:00
renovate-bot cd0ba86fed chore(deps): update https://gitea.t000-n.de/t.behrendt/actions action to v0.2.11 (#98)
CD / Release (push) Successful in 3s
Co-authored-by: Renovate Bot <renovate@t00n.de>
Co-committed-by: Renovate Bot <renovate@t00n.de>
2026-07-19 07:10:05 +02:00
renovate-bot 61ebe3035b chore(deps): update actions (#97)
CD / Release (push) Successful in 11s
Co-authored-by: Renovate Bot <renovate@t00n.de>
Co-committed-by: Renovate Bot <renovate@t00n.de>
2026-07-19 06:10:51 +02:00
renovate-bot fe779d7bf8 chore(deps): update https://gitea.t000-n.de/t.behrendt/conventional-semantic-git-tag-increment action to v0.1.41 (#96)
CD / Release (push) Successful in 3s
Co-authored-by: Renovate Bot <renovate@t00n.de>
Co-committed-by: Renovate Bot <renovate@t00n.de>
2026-07-18 10:42:34 +02:00
renovate-bot 77c53788a5 chore(deps): update https://gitea.t000-n.de/t.behrendt/actions action to v0.2.9 (#95)
CD / Release (push) Successful in 4s
Co-authored-by: Renovate Bot <renovate@t00n.de>
Co-committed-by: Renovate Bot <renovate@t00n.de>
2026-07-18 07:33:23 +02:00
4 changed files with 202 additions and 3 deletions
+156
View File
@@ -0,0 +1,156 @@
name: Add autobump
on:
workflow_dispatch:
inputs:
description:
description: Description for the package rule
required: true
type: string
ecosystem:
description: Ecosystem
required: true
type: choice
options:
- action
- golang
- bun-npm
matchUpdateType:
description: Update type to allow
required: true
type: choice
default: major
options:
- major
- minor
- patch
matchPackageName:
description: Package name to allow autobump for
required: true
type: string
matchNewValue:
description: New value pattern (e.g. v7.* or v7.0.0)
required: true
type: string
jobs:
allow-autobump:
name: Allow autobump
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
token: ${{ secrets.GITEA_TOKEN }}
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version-file: ".bun-version"
- run: bun install --frozen-lockfile
- name: Add package rule
id: rule
env:
DESCRIPTION: ${{ inputs.description }}
ECOSYSTEM: ${{ inputs.ecosystem }}
MATCH_UPDATE_TYPE: ${{ inputs.matchUpdateType }}
MATCH_PACKAGE_NAME: ${{ inputs.matchPackageName }}
MATCH_NEW_VALUE: ${{ inputs.matchNewValue }}
run: |
set -euo pipefail
FILE="${ECOSYSTEM}.json"
if [[ ! -f "${FILE}" ]]; then
echo "::error::Config file ${FILE} does not exist"
exit 1
fi
MATCH_MANAGERS="$(jq -nc --arg e "${ECOSYSTEM}" '{
"action": ["github-actions"],
"golang": ["gomod"],
"helm": ["helm-values"],
"k8s": ["kubernetes"],
"bun-npm": ["npm", "bun"],
"docker-compose": ["docker-compose"]
}[$e]')"
if [[ "${MATCH_MANAGERS}" == "null" || -z "${MATCH_MANAGERS}" ]]; then
echo "::error::Unknown ecosystem: ${ECOSYSTEM}"
exit 1
fi
if [[ -z "${DESCRIPTION}" ]]; then
DESCRIPTION="Automerge ${MATCH_UPDATE_TYPE} updates for ${MATCH_PACKAGE_NAME} to ${MATCH_NEW_VALUE}"
fi
jq \
--arg desc "${DESCRIPTION}" \
--argjson managers "${MATCH_MANAGERS}" \
--arg updateType "${MATCH_UPDATE_TYPE}" \
--arg packageName "${MATCH_PACKAGE_NAME}" \
--arg newValue "${MATCH_NEW_VALUE}" \
'
.packageRules = ((.packageRules // []) + [{
description: $desc,
matchManagers: $managers,
matchUpdateTypes: [$updateType],
matchPackageNames: [$packageName],
matchNewValue: $newValue,
automerge: true,
platformAutomerge: true,
automergeType: "pr",
addLabels: ["automerge"]
}])
' "${FILE}" > "${FILE}.tmp"
mv "${FILE}.tmp" "${FILE}"
SAFE_PKG="$(printf '%s' "${MATCH_PACKAGE_NAME}" | tr '/:' '--' | tr -cd '[:alnum:]._-')"
SAFE_VAL="$(printf '%s' "${MATCH_NEW_VALUE}" | tr '/:*' '---' | tr -cd '[:alnum:]._-')"
BRANCH="chore/allow-autobump-${ECOSYSTEM}-${SAFE_PKG}-${SAFE_VAL}"
TITLE="feat(${ECOSYSTEM}): allow automerge of ${MATCH_PACKAGE_NAME} ${MATCH_NEW_VALUE}"
{
echo "file=${FILE}"
echo "branch=${BRANCH}"
echo "title=${TITLE}"
echo "description=${DESCRIPTION}"
} >> "${GITHUB_OUTPUT}"
- run: bun run fmt
- name: Create pull request
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
FILE: ${{ steps.rule.outputs.file }}
BRANCH: ${{ steps.rule.outputs.branch }}
TITLE: ${{ steps.rule.outputs.title }}
DESCRIPTION: ${{ steps.rule.outputs.description }}
SERVER_URL: ${{ github.server_url }}
REPOSITORY: ${{ github.repository }}
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
run: |
set -euo pipefail
git config user.name "gitea-actions"
git config user.email "gitea-actions@noreply.local"
git checkout -b "${BRANCH}"
git add "${FILE}"
git commit -m "${TITLE}"
git push -u origin "HEAD:${BRANCH}"
BODY="$(printf 'Allow Renovate to automerge updates matching:\n\n- **Ecosystem:** `%s`\n- **Package:** `%s`\n- **Update type:** `%s`\n- **New value:** `%s`\n\n%s\n' \
"${{ inputs.ecosystem }}" \
"${{ inputs.matchPackageName }}" \
"${{ inputs.matchUpdateType }}" \
"${{ inputs.matchNewValue }}" \
"${DESCRIPTION}")"
RESPONSE="$(curl -sfS -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
"${SERVER_URL}/api/v1/repos/${REPOSITORY}/pulls" \
-d "$(jq -n \
--arg title "${TITLE}" \
--arg head "${BRANCH}" \
--arg base "${DEFAULT_BRANCH}" \
--arg body "${BODY}" \
'{title: $title, head: $head, base: $base, body: $body}')")"
PR_URL="$(printf '%s' "${RESPONSE}" | jq -r '.html_url')"
echo "Created pull request: ${PR_URL}"
+10 -2
View File
@@ -4,6 +4,14 @@ on:
push:
branches:
- main
paths:
- "action.json"
- "bun-npm.json"
- "common.json"
- "docker-compose.json"
- "golang.json"
- "helm.json"
- "k8s.json"
workflow_dispatch:
jobs:
@@ -16,10 +24,10 @@ jobs:
fetch-depth: 0
- name: Increment tag
id: tag
uses: https://gitea.t000-n.de/t.behrendt/conventional-semantic-git-tag-increment@39e952658b0543b68395c7566038444c4057cd6a # 0.1.40
uses: https://gitea.t000-n.de/t.behrendt/conventional-semantic-git-tag-increment@3ab82e6aa1db388a34562f5ce6eedb598651d916 # 0.1.42
with:
token: ${{ secrets.GITEA_TOKEN }}
prerelease: ${{ github.event_name == 'workflow_dispatch' }}
- uses: https://gitea.t000-n.de/t.behrendt/actions/release-git-tag@29f50ea246d5d9a62ac3c611fa5c8a6e9846df5a # 0.2.8
- uses: https://gitea.t000-n.de/t.behrendt/actions/release-git-tag@7f9ed2bccd9161d124284619464c5dc5b15b79c0 # 0.2.11
with:
tag: ${{ steps.tag.outputs.new-tag }}
+3 -1
View File
@@ -1,7 +1,9 @@
name: CI
on:
pull_request:
push:
branches-ignore:
- main
jobs:
test:
+33
View File
@@ -74,6 +74,39 @@
"platformAutomerge": true,
"automergeType": "pr",
"addLabels": ["automerge"]
},
{
"description": "Automerge major updates for actions/setup-node to v7.0.0",
"matchManagers": ["github-actions"],
"matchUpdateTypes": ["major"],
"matchPackageNames": ["actions/setup-node"],
"matchNewValue": "v7.*",
"automerge": true,
"platformAutomerge": true,
"automergeType": "pr",
"addLabels": ["automerge"]
},
{
"description": "Automerge major updates for actions/setup-go to v7",
"matchManagers": ["github-actions"],
"matchUpdateTypes": ["major"],
"matchPackageNames": ["actions/setup-go"],
"matchNewValue": "v7.*",
"automerge": true,
"platformAutomerge": true,
"automergeType": "pr",
"addLabels": ["automerge"]
},
{
"description": "Automerge major updates for azure/k8s-deploy to v7",
"matchManagers": ["github-actions"],
"matchUpdateTypes": ["major"],
"matchPackageNames": ["azure/k8s-deploy"],
"matchNewValue": "v7.*",
"automerge": true,
"platformAutomerge": true,
"automergeType": "pr",
"addLabels": ["automerge"]
}
]
}