Skip to content

Commit

Permalink
Merge pull request #224 from topolvm/use-github-app-token-to-create-pr
Browse files Browse the repository at this point in the history
Use Github App token to create chart release PR
  • Loading branch information
satoru-takeuchi authored Nov 21, 2023
2 parents 7fc583d + d767581 commit 12ce9e8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/create-chart-update-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,16 @@ jobs:
sed -r -i "s/appVersion: [[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+/appVersion: ${{ inputs.app-version }}/g" charts/pvc-autoresizer/Chart.yaml
sed -r -i "s/ghcr.io\/topolvm\/pvc-autoresizer:[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+/ghcr.io\/topolvm\/pvc-autoresizer:${{ inputs.app-version }}/g" charts/pvc-autoresizer/Chart.yaml
sed -r -i "s/tag: # [[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+/tag: # ${{ inputs.app-version }}/g" charts/pvc-autoresizer/values.yaml
- name: Issue an access token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.PROJECT_APP_ID }}
private-key: ${{ secrets.PROJECT_APP_PEM }}
- name: "Create pull request"
run: |
git commit -a -s -m "Bump chart version to ${{ inputs.chart-version }}"
git push --set-upstream origin bump-chart-${{ inputs.chart-version }}
gh pr create --draft --fill
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
4 changes: 2 additions & 2 deletions .github/workflows/project-bot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
uses: actions/create-github-app-token@v1
id: app-token
with:
app_id: ${{ secrets.PROJECT_APP_ID }}
private_key: ${{ secrets.PROJECT_APP_PEM }}
app-id: ${{ secrets.PROJECT_APP_ID }}
private-key: ${{ secrets.PROJECT_APP_PEM }}
- name: Get project data
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
Expand Down

0 comments on commit 12ce9e8

Please sign in to comment.