From 75a2e94725ea7a5eca541ee2a5da0e2aa3e74790 Mon Sep 17 00:00:00 2001 From: Timur Olzhabayev Date: Tue, 5 Sep 2023 13:43:06 +0200 Subject: [PATCH 1/2] Adding app auth --- .github/workflows/npm-bump-version.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/npm-bump-version.yml b/.github/workflows/npm-bump-version.yml index 10864424..24d25c83 100644 --- a/.github/workflows/npm-bump-version.yml +++ b/.github/workflows/npm-bump-version.yml @@ -15,10 +15,17 @@ on: jobs: bump-version: runs-on: ubuntu-latest - permissions: - contents: write steps: - - uses: actions/checkout@v4 + - name: Generate token + id: generate_token + uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.APP_PEM }} + + - uses: actions/checkout@v3 + with: + token: ${{ steps.generate_token.outputs.token }} - name: Setup environment uses: actions/setup-node@v3.8.1 From ee54b99f5f6f1d14bd65c128c9787739ca022d96 Mon Sep 17 00:00:00 2001 From: Timur Olzhabayev Date: Tue, 5 Sep 2023 13:44:19 +0200 Subject: [PATCH 2/2] removing git config as it should pick it up via checkout --- .github/workflows/npm-bump-version.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/npm-bump-version.yml b/.github/workflows/npm-bump-version.yml index 24d25c83..704ed407 100644 --- a/.github/workflows/npm-bump-version.yml +++ b/.github/workflows/npm-bump-version.yml @@ -22,7 +22,7 @@ jobs: with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.APP_PEM }} - + - uses: actions/checkout@v3 with: token: ${{ steps.generate_token.outputs.token }} @@ -42,11 +42,6 @@ jobs: - name: Run tests run: yarn test - - name: Setup Git - run: | - git config user.name 'grafanabot' - git config user.email 'bot@grafana.com' - - name: bump version run: npm version ${{ github.event.inputs.version }}