From 5e61fff9b6807ca4ab9a7233ea16f0b30983ea0b Mon Sep 17 00:00:00 2001 From: Yun Shan Date: Sat, 2 Sep 2023 17:29:26 +0800 Subject: [PATCH] auto update --- .github/workflows/auto-update-codegen.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auto-update-codegen.yml b/.github/workflows/auto-update-codegen.yml index 51e941a..ab72c74 100644 --- a/.github/workflows/auto-update-codegen.yml +++ b/.github/workflows/auto-update-codegen.yml @@ -35,7 +35,8 @@ jobs: const appOctokit = new Octokit({ authStrategy: createAppAuth, auth: { appId: '${{ secrets.APP_ID }}', privateKey: `${{ secrets.APP_PRIVATE_KEY_53AIYSR }}` } }); const installation = await appOctokit.rest.apps.getOrgInstallation({ org: '${{ github.repository_owner }}' }); - const { token } = await appOctokit.auth({ type: "installation", installationId: installation.data.id, }); + const result = await appOctokit.rest.apps.createInstallationAccessToken({ installation_id: installation.data.id }); + const token = result.data.token; execSync(`echo "::add-mask::${token}"`); writeFileSync(process.env.GITHUB_OUTPUT, `APP_TOKEN=${token}`, {flag: 'a'}); run: echo "$SCRIPT_CONTENT" >> generate-token.mjs