Skip to content

Commit fef0eec

Browse files
committed
use create token again
1 parent 7b286fc commit fef0eec

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

.github/workflows/build-and-release.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ on:
2020

2121
jobs:
2222
build:
23-
name: build
2423
runs-on: ubuntu-latest
2524
outputs:
2625
rc-app-token: ${{ steps.app-token.outputs.token }}
@@ -31,8 +30,7 @@ jobs:
3130
app-id: ${{ vars.RELEASE_CONTROLLER_APP_ID }}
3231
private-key: ${{ secrets.RELEASE_CONTROLLER_APP_PRIVATE_KEY }}
3332
owner: ${{ github.repository_owner }}
34-
repositories: "backup-utils,backup-utils-private"
35-
skip-token-revoke: true
33+
repositories: "backup-utils-private"
3634
- name: Checkout backup-utils-private
3735
uses: actions/checkout@v4
3836
with:
@@ -80,11 +78,18 @@ jobs:
8078
commit_hash: ${{ steps.empty-commit.outputs.commit_hash }}
8179
release-ref-or-commit: ${{ steps.resolve-release-commit.outputs.release-ref-or-commit }}
8280
steps:
81+
- uses: actions/create-github-app-token@v1
82+
id: app-token
83+
with:
84+
app-id: ${{ vars.RELEASE_CONTROLLER_APP_ID }}
85+
private-key: ${{ secrets.RELEASE_CONTROLLER_APP_PRIVATE_KEY }}
86+
owner: ${{ github.repository_owner }}
87+
repositories: "backup-utils,backup-utils-private"
8388
- name: Checkout backup-utils
8489
if: github.event.inputs.branch_ref_or_commit == ''
8590
uses: actions/checkout@v4
8691
with:
87-
token: ${{ needs.build.outputs.rc-app-token }}
92+
token: ${{ steps.app-token.outputs.token }}
8893
repository: github/backup-utils
8994
ref: master
9095
- name: Create empty commit
@@ -109,10 +114,14 @@ jobs:
109114
echo "Using provided commit sha for release commit"
110115
echo "release-ref-or-commit=\"${{ github.event.inputs.branch_ref_or_commit }}\"" >> "$GITHUB_OUTPUT"
111116
fi
117+
- name: Check rc-app-token value
118+
if: needs.build.outputs.rc-app-token == ''
119+
run: |
120+
echo "****** rc-app-token is empty ******"
112121
- name: Checkout backup-utils-private for release notes
113122
uses: actions/checkout@v4
114123
with:
115-
token: ${{ needs.build.outputs.rc-app-token }}
124+
token: ${{ steps.app-token.outputs.token }}
116125
repository: github/backup-utils-private
117126
- name: Download deb artifact
118127
uses: actions/download-artifact@v3

0 commit comments

Comments
 (0)