mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-04 23:53:23 +00:00
fix(ci): pull out deployment ID from API response
This commit is contained in:
parent
6c8aa634e7
commit
5c847467e5
6
.github/workflows/ui-tests.yaml
vendored
6
.github/workflows/ui-tests.yaml
vendored
@ -76,12 +76,13 @@ jobs:
|
||||
});
|
||||
- name: Add deployment to PR
|
||||
uses: actions/github-script@v6
|
||||
id: deployment
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const fs = require('fs');
|
||||
const deploymentUrl = fs.readFileSync('_vercel-deployment-url', 'utf8');
|
||||
await github.rest.repos.createDeployment({
|
||||
const deployment = await github.rest.repos.createDeployment({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
ref: context.sha,
|
||||
@ -94,6 +95,7 @@ jobs:
|
||||
deploymentUrl,
|
||||
}),
|
||||
});
|
||||
console.log("::set-output name=deployment_id::" + deployment.data.id);
|
||||
- name: Add deployment status to PR
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
@ -104,7 +106,7 @@ jobs:
|
||||
await github.rest.repos.createDeploymentStatus({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
deployment_id: context.payload.deployment.id,
|
||||
deployment_id: ${{ steps.deployment.outputs.deployment_id }},
|
||||
state: 'success',
|
||||
environment_url: deploymentUrl,
|
||||
log_url: deploymentUrl,
|
||||
|
Loading…
x
Reference in New Issue
Block a user