Skip to content

chore(deps): update pnpm to v10.33.0 - autoclosed #191

chore(deps): update pnpm to v10.33.0 - autoclosed

chore(deps): update pnpm to v10.33.0 - autoclosed #191

name: Chart Versioning on Merge
on:
pull_request_target:
types: [closed]
branches: [main]
permissions:
contents: write
pull-requests: write
concurrency:
group: versioning-on-merge
cancel-in-progress: false
jobs:
version-on-merge:
if: github.event.pull_request.merged == true && !startsWith(github.event.pull_request.head.ref, 'chore/version-bump')
runs-on: ubuntu-latest
steps:
- name: Checkout base branch (main)
uses: actions/checkout@v6
with:
ref: main
fetch-depth: 0
- name: Set up environment
run: |
git fetch origin main
git checkout -B main origin/main
git reset --hard origin/main
- name: Cache Helm binary
id: cache-helm
uses: actions/cache@v5
with:
path: /usr/local/bin/helm
key: helm-v3.19.0-linux-amd64
- name: Download Helm
if: steps.cache-helm.outputs.cache-hit != 'true'
run: |
curl -fsSL https://get.helm.sh/helm-v3.19.0-linux-amd64.tar.gz -o helm.tar.gz
tar -zxvf helm.tar.gz
sudo mv linux-amd64/helm /usr/local/bin/helm
rm -rf helm.tar.gz linux-amd64
- name: Set Helm permissions
run: sudo chmod +x /usr/local/bin/helm
- name: Calculate and stage chart version bumps on main
uses: actions/github-script@v8
with:
script: |
// Skip if PR has manual-versioning label
const pr = context.payload.pull_request;
const { data: labels } = await github.rest.issues.listLabelsOnIssue({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr.number,
});
if (labels.some(l => l.name === 'manual-versioning')) {
core.info("PR has label 'manual-versioning'. Skipping automatic versioning on merge.");
return;
}
const { default: runPRVersioning } = await import('${{ github.workspace }}/tooling/runner.js')
await runPRVersioning({ github, core, context, pullRequestMode: false })
- name: Create version bump PR to main
id: cpr
uses: peter-evans/create-pull-request@v8
with:
commit-message: chore(version) - bump charts after merge of PR #${{ github.event.pull_request.number }}
title: chore(version) - bump charts after merge of PR #${{ github.event.pull_request.number }}
body: |
Automated chart versioning after merge of PR #${{ github.event.pull_request.number }}.
This PR updates Chart.yaml versions, packages updated charts into docs/interledger,
and regenerates the Helm index.
branch: chore/version-bump/pr-${{ github.event.pull_request.number }}
base: main
labels: |
versioning
automated
automerge
add-paths: |
charts/**
docs/interledger/**
delete-branch: true
- name: Enable auto-merge (squash)
if: ${{ steps.cpr.outputs.pull-request-number != '' }}
uses: peter-evans/enable-pull-request-automerge@v3
with:
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: squash
- name: Use the token from CI_BOT_PAT to auto approve the PR
if: ${{ steps.cpr.outputs.pull-request-number != '' }}
env:
GH_TOKEN: ${{ secrets.CI_BOT_PAT }}
run: |
gh pr review \
-R "${{ github.repository }}" \
"${{ steps.cpr.outputs.pull-request-number }}" \
--approve \
--body "Auto-approved version bump PR."