mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-10 10:26:53 +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
|
- name: Add deployment to PR
|
||||||
uses: actions/github-script@v6
|
uses: actions/github-script@v6
|
||||||
|
id: deployment
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
script: |
|
script: |
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const deploymentUrl = fs.readFileSync('_vercel-deployment-url', 'utf8');
|
const deploymentUrl = fs.readFileSync('_vercel-deployment-url', 'utf8');
|
||||||
await github.rest.repos.createDeployment({
|
const deployment = await github.rest.repos.createDeployment({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
ref: context.sha,
|
ref: context.sha,
|
||||||
@ -94,6 +95,7 @@ jobs:
|
|||||||
deploymentUrl,
|
deploymentUrl,
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
console.log("::set-output name=deployment_id::" + deployment.data.id);
|
||||||
- name: Add deployment status to PR
|
- name: Add deployment status to PR
|
||||||
uses: actions/github-script@v6
|
uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
@ -104,7 +106,7 @@ jobs:
|
|||||||
await github.rest.repos.createDeploymentStatus({
|
await github.rest.repos.createDeploymentStatus({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
deployment_id: context.payload.deployment.id,
|
deployment_id: ${{ steps.deployment.outputs.deployment_id }},
|
||||||
state: 'success',
|
state: 'success',
|
||||||
environment_url: deploymentUrl,
|
environment_url: deploymentUrl,
|
||||||
log_url: deploymentUrl,
|
log_url: deploymentUrl,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user