|
22 | 22 | build:
|
23 | 23 | runs-on: ubuntu-latest
|
24 | 24 | steps:
|
25 |
| - # resulting token still gets denied by the backup-utils repo |
26 |
| - # see: https://github.com/actions/create-github-app-token/pull/46 |
27 | 25 | - uses: timreimherr/create-github-app-token@main
|
28 | 26 | id: app-token
|
29 | 27 | with:
|
|
32 | 30 | private_key: ${{ secrets.RELEASE_CONTROLLER_APP_PRIVATE_KEY }}
|
33 | 31 | owner: ${{ github.repository_owner }}
|
34 | 32 | repositories: backup-utils,backup-utils-private
|
35 |
| - - name: Print app permissions |
| 33 | + - name: Checkout backup-utils |
| 34 | + uses: actions/checkout@v4 |
| 35 | + with: |
| 36 | + token: ${{ steps.app-token.outputs.token }} |
| 37 | + repository: github/backup-utils |
| 38 | + ref: master |
| 39 | + - name: Create empty commit in backup-utils |
| 40 | + id: empty-commit |
36 | 41 | run: |
|
37 |
| - curl -H "Authorization: Bearer ${{ steps.app-token.outputs.token }}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/app/installations | jq '.' |
| 42 | + git config user.name "release-controller[bot]" |
| 43 | + git config user.email "223695+release-controller[bot]@users.noreply.github.com" |
| 44 | + git fetch origin tims-test-branch |
| 45 | + git checkout tims-test-branch |
| 46 | + git commit --allow-empty -m "${{ github.event.inputs.version }} release" |
| 47 | + git push origin tims-test-branch "https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/github/backup-utils.git" |
| 48 | + echo "commit-sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT |
| 49 | + - name: Echo Success if commit was created |
| 50 | + if: steps.empty-commit.outputs.commit-sha != '' |
| 51 | + run: | |
| 52 | + echo "Success" |
| 53 | + # resulting token still gets denied by the backup-utils repo |
| 54 | + # see: https://github.com/actions/create-github-app-token/pull/46 |
| 55 | + # - uses: timreimherr/create-github-app-token@main |
| 56 | + # id: app-token |
| 57 | + # with: |
| 58 | + # # required |
| 59 | + # app_id: ${{ vars.RELEASE_CONTROLLER_APP_ID }} |
| 60 | + # private_key: ${{ secrets.RELEASE_CONTROLLER_APP_PRIVATE_KEY }} |
| 61 | + # owner: ${{ github.repository_owner }} |
| 62 | + # repositories: backup-utils,backup-utils-private |
| 63 | + # - name: Print app permissions |
| 64 | + # run: | |
| 65 | + # curl -H "Authorization: Bearer ${{ steps.app-token.outputs.token }}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/app/installations | jq '.' |
38 | 66 | # - name: Checkout backup-utils-private
|
39 | 67 | # uses: actions/checkout@v4
|
40 | 68 | # with:
|
|
0 commit comments