Skip to content

Commit f300097

Browse files
api-clients-generation-pipeline[bot]jirikuncarci.datadog-api-spec
authored
ci: migrate scripts to GH actions (#503)
* migrate to GH actions * Regenerate client from commit d33e517 of spec repo Co-authored-by: Jiri Kuncar <[email protected]> Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent c0d9c03 commit f300097

File tree

6 files changed

+22
-92
lines changed

6 files changed

+22
-92
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.4.1.dev8",
7-
"regenerated": "2021-06-30 07:22:51.494685",
8-
"spec_repo_commit": "4cc1eed"
7+
"regenerated": "2021-06-30 10:01:20.266133",
8+
"spec_repo_commit": "d33e517"
99
},
1010
"v2": {
1111
"apigentools_version": "1.4.1.dev8",
12-
"regenerated": "2021-06-30 07:23:17.616373",
13-
"spec_repo_commit": "4cc1eed"
12+
"regenerated": "2021-06-30 10:01:43.040834",
13+
"spec_repo_commit": "d33e517"
1414
}
1515
}
1616
}

.github/workflows/approved_status.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ jobs:
2929
- name: Checkout code
3030
uses: actions/checkout@v2
3131
- name: Post PR review status check
32-
uses: actions/github-script@v4.0.2
32+
uses: DataDog/github-actions/post-review-status@v1.0.0
3333
with:
3434
github-token: ${{ steps.get_token.outputs.token }}
35-
script: |
36-
const script = require('.github/workflows/scripts/approved_status.js')
37-
await script.post_approved_pr_status_check(github, context)
35+
repo: datadog-api-spec

.github/workflows/scripts/approved_status.js

Lines changed: 0 additions & 42 deletions
This file was deleted.

.github/workflows/scripts/test_integration.js

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,9 @@ jobs:
7373
- name: Checkout code
7474
uses: actions/checkout@v2
7575
- name: Post status check
76-
uses: actions/[email protected]
77-
env:
78-
JOB_STATUS: ${{ needs.test.result }}
76+
uses: DataDog/github-actions/[email protected]
7977
with:
8078
github-token: ${{ steps.get_token.outputs.token }}
81-
script: |
82-
const script = require('./.github/workflows/scripts/test_integration.js')
83-
await script.post_status_check(github, context, "unit", process.env.JOB_STATUS)
79+
repo: datadog-api-spec
80+
status: ${{ needs.test.result }}
81+
context: unit

.github/workflows/test_integration.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ jobs:
4343
uses: actions/checkout@v2
4444
- name: Post pending status check
4545
if: github.event_name == 'pull_request' && contains(github.event.pull_request.head.ref, 'datadog-api-spec/generated/')
46-
uses: actions/github-script@v4.0.2
46+
uses: DataDog/github-actions/post-status-check@v1.0.0
4747
with:
4848
github-token: ${{ steps.get_token.outputs.token }}
49-
script: |
50-
const script = require('.github/workflows/scripts/test_integration.js')
51-
await script.post_status_check(github, context, "integration", "pending")
49+
repo: datadog-api-spec
50+
status: pending
51+
context: integration
5252
- name: Set up Python 3.8
5353
uses: actions/setup-python@v2
5454
with:
@@ -72,17 +72,17 @@ jobs:
7272
DD_PYTEST_OPERATION_NAME: "test"
7373
- name: Post failure status check
7474
if: failure() && github.event_name == 'pull_request' && contains(github.event.pull_request.head.ref, 'datadog-api-spec/generated/')
75-
uses: actions/github-script@v4.0.2
75+
uses: DataDog/github-actions/post-status-check@v1.0.0
7676
with:
7777
github-token: ${{ steps.get_token.outputs.token }}
78-
script: |
79-
const script = require('./.github/workflows/scripts/test_integration.js')
80-
await script.post_status_check(github, context, "integration", "failure")
78+
repo: datadog-api-spec
79+
status: failure
80+
context: integration
8181
- name: Post success status check
8282
if: "!failure() && github.event_name == 'pull_request' && contains(github.event.pull_request.head.ref, 'datadog-api-spec/generated/')"
83-
uses: actions/github-script@v4.0.2
83+
uses: DataDog/github-actions/post-status-check@v1.0.0
8484
with:
8585
github-token: ${{ steps.get_token.outputs.token }}
86-
script: |
87-
const script = require('./.github/workflows/scripts/test_integration.js')
88-
await script.post_status_check(github, context, "integration", "success")
86+
repo: datadog-api-spec
87+
status: success
88+
context: integration

0 commit comments

Comments
 (0)