File tree Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Original file line number Diff line number Diff line change 9999 echo "result=failure" >> $GITHUB_OUTPUT
100100 fi
101101
102+ - name : Generate GitHub App token
103+ id : generate-token
104+ uses : actions/github-script@v7
105+ with :
106+ script : |
107+ const { createAppAuth } = require('@octokit/auth-app');
108+
109+ const appId = '${{ secrets.APP_ID }}';
110+ const privateKey = `${{ secrets.APP_PRIVATE_KEY }}`;
111+ const installationId = '${{ secrets.APP_INSTALLATION_ID }}';
112+
113+ // Create authenticated app instance
114+ const auth = createAppAuth({
115+ appId: appId,
116+ privateKey: privateKey,
117+ installationId: installationId,
118+ });
119+
120+ // Get installation access token
121+ const { token } = await auth({ type: 'installation' });
122+
123+ // Set the token as output
124+ core.setSecret(token);
125+ core.setOutput('token', token);
126+
127+ console.log('Successfully generated installation access token');
128+
102129 - name : Stop Supabase
103130 if : always()
104131 run : supabase stop
@@ -107,7 +134,7 @@ jobs:
107134 if : always()
108135 uses : actions/github-script@v7
109136 with :
110- github-token : ${{ secrets.GITHUB_TOKEN }}
137+ github-token : ${{ steps.generate-token.outputs.token }}
111138 script : |
112139 const typeCheckResult = '${{ steps.type-check.outputs.result }}' || 'failure';
113140 const unitTestResult = '${{ steps.unit-tests.outputs.result }}' || 'failure';
You can’t perform that action at this time.
0 commit comments