From e4ae1c311b493549f34acf4029186e38fbcc5c63 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 13 Nov 2024 13:14:31 +0900 Subject: [PATCH] Removing additional token step --- .github/workflows/build_release.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index a5257b07..12030a2e 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -238,22 +238,25 @@ jobs: # RetroDECK*.flatpak.sha # RetroDECK*Artifact.tar.gz - Generate-Rekku-Token: - uses: RetroDECK/components-template/.github/workflows/generate_rekku_token.yml@main - # needs: Build_RetroDECK - secrets: - REKKU_PRIVATE_KEY: ${{ secrets.REKKU_PRIVATE_KEY }} - GitHub-publish: runs-on: ubuntu-latest # needs: [Generate-Rekku-Token, Build_RetroDECK] - needs: [Generate-Rekku-Token] env: tag: ${{ needs.Build_RetroDECK.outputs.tag }} release_body: ${{ needs.Build_RetroDECK.outputs.release_body }} MAKE_LATEST: ${{ needs.Build_RetroDECK.outputs.MAKE_LATEST }} steps: + - name: Generate a token for Rekku + if: ${{ github.repository == 'RetroDECK/RetroDECK' }} + id: generate-rekku-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ vars.REKKU_APP_ID }} + private-key: ${{ secrets.REKKU_PRIVATE_KEY }} + repositories: "RetroDECK,Cooker" + owner: "RetroDECK" + # Determine if Target Repository is Main or not, in that case is a Cooker build - name: Determine target repository id: set-repo @@ -274,7 +277,7 @@ jobs: artifacts: "*.flatpak,*.flatpak.sha,*Artifact.tar.gz" allowUpdates: true makeLatest: ${{ env.MAKE_LATEST }} - token: ${{ needs.Generate-Rekku-Token.outputs.rekku_token }} + token: ${{ steps.generate-rekku-token.outputs.token }} repo: "${{ env.repo_name }}" continue-on-error: ${{ github.ref != 'refs/heads/main' }} @@ -291,7 +294,7 @@ jobs: git tag "${{ steps.set-outputs.outputs.tag }}" git push origin "${{ steps.set-outputs.outputs.tag }}" env: - GITHUB_TOKEN: ${{ env.REKKU_TOKEN }} + GITHUB_TOKEN: ${{ steps.generate-rekku-token.outputs.token }} # As backup we're even publishing the build on our own selfhosted Fogejo instance # Forgejo Publish Job if main branch