Skip to content

Fix stuck jobs on bump-chart-version workflow #1814

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/bump-chart-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,17 @@ jobs:
- name: Check out repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
id: app-token
with:
app-id: ${{ vars.DD_GITHUB_TOKEN_APP_ID }}
private-key: ${{ secrets.DD_GITHUB_TOKEN_PRIVATE_KEY }}

- name: Extract all chart label information and update Chart.yaml and CHANGELOG.md
id: update_charts
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ steps.app-token.outputs.token }}
script: |
// Based on script from: https://github.com/DataDog/k8s-datadog-agent-ops/blob/main/.github/workflows/automatically-bump.yaml

Expand Down Expand Up @@ -228,7 +235,7 @@ jobs:

// If the changelog has not been modified, add a new entry.
const prLink = `https://github.com/${context.repo.owner}/${context.repo.repo}/pull/${pr.number}`;
const newEntry = `## ${desiredVersion} \n\n* ${pr.title} ([#${pr.number}](${prLink})).\n\n`;
const newEntry = `## ${desiredVersion}\n\n* ${pr.title} ([#${pr.number}](${prLink})).\n\n`;

if (versionHeaderIdx !== -1) {
const headerSection = lines.slice(0, versionHeaderIdx).join('\n').trimEnd();
Expand Down
Loading