Skip to content

chore(deps): update tombi-toml/setup-tombi action to v1.5.2 #2155

chore(deps): update tombi-toml/setup-tombi action to v1.5.2

chore(deps): update tombi-toml/setup-tombi action to v1.5.2 #2155

Workflow file for this run

name: Bump
on:
issue_comment:
types: [created]
jobs:
chart-version:
name: Chart Version
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
issues: write
pull-requests: write
steps:
- name: Check for command
id: command
continue-on-error: true
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const commentBody = context.payload.comment.body;
const commandPrefix = "/bump ";
let commandName = "";
let chartName = "";
let bumpLevel = "";
if (commentBody.startsWith(commandPrefix)) {
commandName = "bump";
const args = commentBody.slice(commandPrefix.length).trim().split(" ");
if (args.length > 0 && args[0]) {
chartName = args[0];
bumpLevel = args[1] || "patch";
console.log(`Chart Name: ${chartName}, Bump Level: ${bumpLevel}`);
console.log(`Args array: ${JSON.stringify(args)}`);
const fs = require('fs');
fs.appendFileSync(process.env.GITHUB_OUTPUT, `chart-name=${chartName}\n`);
fs.appendFileSync(process.env.GITHUB_OUTPUT, `bump-level=${bumpLevel}\n`);
fs.appendFileSync(process.env.GITHUB_OUTPUT, `command-name=${commandName}\n`);
} else {
commandName = "";
core.warning("No chart name provided. Format: /bump <chart-name> [level]");
}
}
- name: Add eyes reaction
if: steps.command.outputs.command-name == 'bump'
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
comment-id: ${{ github.event.comment.id }}
reactions: eyes
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
if: steps.command.outputs.command-name == 'bump'
with:
python-version: 3.14
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
if: steps.command.outputs.command-name == 'bump'
with:
go-version: ^1
- name: Setup helm-docs
if: steps.command.outputs.command-name == 'bump'
run: go install github.com/norwoodj/helm-docs/cmd/helm-docs@latest
- name: Generate token
if: steps.command.outputs.command-name == 'bump'
id: generate_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2
with:
app_id: ${{ secrets.RHDH_GITHUB_APP_ID }}
private_key: ${{ secrets.RHDH_GITHUB_APP_PRIVATE_KEY }}
- name: Checkout Repository
if: steps.command.outputs.command-name == 'bump'
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
token: ${{ steps.generate_token.outputs.token }}
- name: Checkout Pull Request
if: steps.command.outputs.command-name == 'bump'
run: gh pr checkout ${{ github.event.issue.number }}
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
- name: Get version
if: steps.command.outputs.command-name == 'bump'
id: get_version
uses: mikefarah/yq@c14f446382944492701b16c1ddb48bb9dbe683e3 # v4.53.6
with:
cmd: yq ".version" charts/${{ steps.command.outputs.chart-name }}/Chart.yaml
- uses: actions-ecosystem/action-bump-semver@34e334551143a5301f38c830e44a22273c6ff5c5 # v1
if: steps.command.outputs.command-name == 'bump'
id: semver
with:
current_version: ${{ steps.get_version.outputs.result }}
level: ${{ steps.command.outputs.bump-level }}
- name: Bump the version
if: steps.command.outputs.command-name == 'bump'
uses: mikefarah/yq@c14f446382944492701b16c1ddb48bb9dbe683e3 # v4.53.6
with:
cmd: yq -i '.version = "${{ steps.semver.outputs.new_version }}"' charts/${{ steps.command.outputs.chart-name }}/Chart.yaml
- name: Run pre-commit
if: steps.command.outputs.command-name == 'bump'
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
continue-on-error: true
- name: Setup Gitsign
if: steps.command.outputs.command-name == 'bump'
uses: chainguard-dev/actions/setup-gitsign@142d22e4cec7c824db396585b9bc86f76f7c1732 # v1.6.35
- name: Commit pre-commit changes
if: steps.command.outputs.command-name == 'bump'
uses: stefanzweifel/git-auto-commit-action@4a55954c782fc1ea30b9056cd3e7a2b40ca8887d # v7
with:
commit_message: Bump ${{ steps.command.outputs.chart-name }} version to ${{ steps.semver.outputs.new_version }}
commit_options: "-s"
commit_user_name: RHDH Bot
commit_user_email: 146280956+rhdh-bot@users.noreply.github.com
commit_author: RHDH Bot <146280956+rhdh-bot@users.noreply.github.com >