From 1d6bd48925e5470bb36cee8ee88de281b32beca1 Mon Sep 17 00:00:00 2001 From: sacha-c Date: Wed, 4 Dec 2024 15:43:52 +0100 Subject: [PATCH 1/2] ci: use github app token --- .github/workflows/bumpversion.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bumpversion.yml b/.github/workflows/bumpversion.yml index c8ee6dd..20a4869 100644 --- a/.github/workflows/bumpversion.yml +++ b/.github/workflows/bumpversion.yml @@ -11,15 +11,19 @@ jobs: runs-on: ubuntu-latest name: "Bump version and create changelog with commitizen" steps: + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ vars.ELEMENTS_HELPER_APP_ID }} + private-key: ${{ secrets.ELEMENTS_HELPER_PRIVATE_KEY }} - name: Check out uses: actions/checkout@v4 with: fetch-depth: 0 - token: "${{ secrets.GITHUB_TOKEN }}" - id: cz name: Create bump and changelog uses: commitizen-tools/commitizen-action@master with: - github_token: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ steps.app-token.outputs.token }} - name: Print Version run: echo "Bumped to version ${{ steps.cz.outputs.version }}" From eb3faf9fb94c4af4f21391b298d5b2af30286916 Mon Sep 17 00:00:00 2001 From: sacha-c Date: Wed, 4 Dec 2024 16:11:11 +0100 Subject: [PATCH 2/2] test: just testing something --- .github/workflows/tests.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5f6f7fb..423a07c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,7 +8,17 @@ jobs: test: runs-on: ubuntu-latest steps: + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ vars.ELEMENTS_HELPER_APP_ID }} + private-key: ${{ secrets.ELEMENTS_HELPER_PRIVATE_KEY }} - uses: actions/checkout@v4 + with: + token: ${{ steps.app-token.outputs.token }} + ref: ${{ github.head_ref }} + # Make sure the value of GITHUB_TOKEN will not be persisted in repo's config + persist-credentials: false - name: Setup Go uses: actions/setup-go@v5 with: