diff --git a/.github/renovate.json b/.github/renovate.json index de3ec6784..71aa5bc0b 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -6,7 +6,10 @@ "ignorePresets": [ "github>gabe565/renovate-config:githubActions" ], - "gitIgnoredAuthors": ["renovate[bot]@users.noreply.github.com"], + "gitIgnoredAuthors": [ + "renovate[bot]@users.noreply.github.com", + "160046936+charts-bot[bot]@users.noreply.github.com" + ], "regexManagers": [ { "fileMatch": ["\\.yaml$"], diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6ff617728..0bd8a50b9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -19,7 +19,17 @@ jobs: release-charts: name: Release Charts 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: @@ -27,8 +37,8 @@ jobs: - name: Configure Git run: | - git config user.name "$GITHUB_ACTOR" - git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + git config user.name "${{ env.AUTHOR_USER }}" + git config user.email "${{ env.AUTHOR_EMAIL }}" - name: Add Helm repos run: | @@ -87,7 +97,7 @@ jobs: with: skip_packaging: true env: - CR_TOKEN: ${{ github.token }} + CR_TOKEN: ${{ steps.app-token.outputs.token }} CR_PAGES_BRANCH: helm-index build-docs: diff --git a/.github/workflows/renovate.yaml b/.github/workflows/renovate.yaml index 180783aa0..819c3cb41 100644 --- a/.github/workflows/renovate.yaml +++ b/.github/workflows/renovate.yaml @@ -12,10 +12,21 @@ 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 @@ -31,6 +42,7 @@ jobs: 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, @@ -93,4 +105,7 @@ jobs: 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 }}