diff --git a/.github/workflows/build_artifacts.yml b/.github/workflows/build_artifacts.yml index b900529..bf7750e 100644 --- a/.github/workflows/build_artifacts.yml +++ b/.github/workflows/build_artifacts.yml @@ -30,13 +30,8 @@ jobs: run: curl -s "https://raw.githubusercontent.com/RetroDECK/components-template/refs/heads/main/automation_tools/install_dependencies.sh" | /bin/bash - 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 }} - owner: "RetroDECK" + uses: RetroDECK/components-template/.github/workflows/generate_rekku_token.yml@main - name: Clone repo uses: actions/checkout@v4 diff --git a/.github/workflows/generate_rekku_token.yml b/.github/workflows/generate_rekku_token.yml new file mode 100644 index 0000000..43fdf7a --- /dev/null +++ b/.github/workflows/generate_rekku_token.yml @@ -0,0 +1,18 @@ +name: "Generate a token for Rekku" + +on: + workflow_call: + +jobs: + Generate-a-token-for-Rekku: + runs-on: ubuntu-latest + + steps: + + - name: Generate a token for Rekku + id: generate-rekku-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ vars.REKKU_APP_ID }} + private-key: ${{ secrets.REKKU_PRIVATE_KEY }} + owner: "RetroDECK" diff --git a/.github/workflows/pr_from_upstream.yml b/.github/workflows/pr_from_upstream.yml index 5816ccd..9244967 100644 --- a/.github/workflows/pr_from_upstream.yml +++ b/.github/workflows/pr_from_upstream.yml @@ -25,11 +25,7 @@ jobs: - name: Generate a token for Rekku id: generate-rekku-token - uses: actions/create-github-app-token@v1 - with: - app-id: ${{ vars.REKKU_APP_ID }} - private-key: ${{ secrets.REKKU_PRIVATE_KEY }} - owner: "RetroDECK" + uses: RetroDECK/components-template/.github/workflows/generate_rekku_token.yml@main - name: Configuring Git run: |