|
73 | 73 | summary: "Tag ${{ env.MINGIT_ONLY == 'true' && 'Min' || '' }}Git @${{ env.REV }}" |
74 | 74 | text: "For details, see [this run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id}})." |
75 | 75 | details-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id}}" |
| 76 | + - name: configure token |
| 77 | + if: github.repository_visibility == 'private' |
| 78 | + uses: actions/github-script@v7 |
| 79 | + with: |
| 80 | + script: | |
| 81 | + const fs = require('fs') |
| 82 | + if (!fs.existsSync(process.env.HOME)) fs.mkdirSync(process.env.HOME) |
| 83 | + const { callGit, getPushAuthorizationHeader } = require('./repository-updates.js') |
| 84 | + for (const repo of ['build-extra', process.env.REPO]) { |
| 85 | + const header = await getPushAuthorizationHeader( |
| 86 | + console, |
| 87 | + core.setSecret, |
| 88 | + ${{ secrets.GH_APP_ID }}, |
| 89 | + ${{ toJSON(secrets.GH_APP_PRIVATE_KEY) }}, |
| 90 | + process.env.OWNER, |
| 91 | + repo |
| 92 | + ) |
| 93 | + console.log(callGit(['config', '--global', `http.https://github.com/${process.env.OWNER}/${repo}.extraHeader`, header])) |
| 94 | + } |
76 | 95 | - name: Configure user |
77 | 96 | run: | |
78 | 97 | USER_NAME="${{github.actor}}" && |
@@ -103,6 +122,10 @@ jobs: |
103 | 122 | GPGKEY: ${{secrets.GPGKEY}} |
104 | 123 | run: | |
105 | 124 | git clone --bare --filter=blob:none https://github.com/git/git && |
| 125 | + if test git-for-windows != "$OWNER" |
| 126 | + then |
| 127 | + git --git-dir=git.git fetch --tags --filter=blob:none https://github.com/git-for-windows/git |
| 128 | + fi && |
106 | 129 | git -C git.git fetch --tags --filter=blob:none "https://github.com/$OWNER/$REPO" "$RELEASE_BRANCH:refs/remotes/origin/$RELEASE_BRANCH" "$REV" && |
107 | 130 |
|
108 | 131 | sh -x "$GITHUB_WORKSPACE/update-scripts/tag-git.sh" \ |
|
0 commit comments