diff --git a/.github/workflows/sync-vue-pivottable.yml b/.github/workflows/sync-vue-pivottable.yml index 3b1ac27..5d25d96 100644 --- a/.github/workflows/sync-vue-pivottable.yml +++ b/.github/workflows/sync-vue-pivottable.yml @@ -18,8 +18,19 @@ jobs: fetch-depth: 0 token: ${{ secrets.GITHUB_TOKEN }} + - name: Generate GitHub App Token + id: generate-token + uses: tibdex/github-app-token@v1 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.APP_PRIVATE_KEY }} + installation_id: ${{ secrets.APP_INSTALLATION_ID }} + - name: Update or create release branch run: | + git config --global user.name "GitHub Actions" + git config --global user.email "actions@github.com" + if git ls-remote --exit-code --heads origin release; then git fetch origin release git checkout -b release origin/release @@ -28,4 +39,5 @@ jobs: git checkout -b release fi + git remote set-url origin https://x-access-token:${{ steps.generate-token.outputs.token }}@github.com/${{ github.repository }} git push origin release