Skip to content

Commit

Permalink
try giving permission to the workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Sergi Castro <[email protected]>
  • Loading branch information
sergicastro authored Nov 8, 2024
1 parent b04ba9a commit 9a440b5
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions .github/workflows/make-release.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Create Release

permissions:
contents: write

on:
workflow_dispatch:
inputs:
Expand All @@ -20,21 +23,21 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
- name: Generate a token
id: app_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.RELEASE_ACTION_APP_ID }}
private-key: ${{ secrets.RELEASE_ACTION_PRIVATE_KEY }}
- name: Get GitHub App User ID
id: get-user-id
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
- name: Configure git with App User
run: |
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'
# - name: Generate a token
# id: app_token
# uses: actions/create-github-app-token@v1
# with:
# app-id: ${{ secrets.RELEASE_ACTION_APP_ID }}
# private-key: ${{ secrets.RELEASE_ACTION_PRIVATE_KEY }}
# - name: Get GitHub App User ID
# id: get-user-id
# run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
# env:
# GH_TOKEN: ${{ steps.app-token.outputs.token }}
# - name: Configure git with App User
# run: |
# git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
# git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'
- name: Update kubegres.yaml
run: make deploy
- name: Create and push the new tag
Expand Down

0 comments on commit 9a440b5

Please sign in to comment.