워크플로에 대한 REST API 엔드포인트
REST API를 사용하면 Actions 리포지토리의 워크플로를 볼 수 있습니다. 워크플로는 다양한 도구와 서비스를 사용하여 소프트웨어 개발 수명 주기를 자동화합니다. 자세한 정보는 Actions 설명서의 워크플로 정보을(를) 참조하세요.
Lists the workflows in a repository.
Anyone with read access to the repository can use this endpoint.
OAuth app tokens and personal access tokens (classic) need the repo
scope to use this endpoint with a private repository.
"List repository workflows"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰에는 다음 권한 집합이 있어야 합니다.:
- "Actions" repository permissions (read)
공용 리소스만 요청되는 경우 인증 또는 앞서 언급한 권한 없이 이 엔드포인트를 사용할 수 있습니다.
"List repository workflows"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept stringSetting to |
속성, 형식, 설명 |
---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository without the |
속성, 형식, 설명 |
---|
per_page integerThe number of results per page (max 100). For more information, see "Using pagination in the REST API." 기본값: |
page integerThe page number of the results to fetch. For more information, see "Using pagination in the REST API." 기본값: |
"List repository workflows"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
"List repository workflows"에 대한 코드 샘플
요청 예제
curl -L \ -H "Accept: application/vnd.+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X--Api-Version: 2022-11-28" \ https://api..com/repos/OWNER/REPO/actions/workflows
Response
Status: 200
{ "total_count": 2, "workflows": [ { "id": 161335, "node_id": "MDg6V29ya2Zsb3cxNjEzMzU=", "name": "CI", "path": "./workflows/blank.yaml", "state": "active", "created_at": "2020-01-08T23:48:37.000-08:00", "updated_at": "2020-01-08T23:50:21.000-08:00", "url": "https://api..com/repos/octo-org/octo-repo/actions/workflows/161335", "html_url": "https://.com/octo-org/octo-repo/blob/master/./workflows/161335", "badge_url": "https://.com/octo-org/octo-repo/workflows/CI/badge.svg" }, { "id": 269289, "node_id": "MDE4OldvcmtmbG93IFNlY29uZGFyeTI2OTI4OQ==", "name": "Linter", "path": "./workflows/linter.yaml", "state": "active", "created_at": "2020-01-08T23:48:37.000-08:00", "updated_at": "2020-01-08T23:50:21.000-08:00", "url": "https://api..com/repos/octo-org/octo-repo/actions/workflows/269289", "html_url": "https://.com/octo-org/octo-repo/blob/master/./workflows/269289", "badge_url": "https://.com/octo-org/octo-repo/workflows/Linter/badge.svg" } ] }
Gets a specific workflow. You can replace workflow_id
with the workflow file name. For example, you could use main.yaml
.
Anyone with read access to the repository can use this endpoint.
OAuth app tokens and personal access tokens (classic) need the repo
scope to use this endpoint with a private repository.
"Get a workflow"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰에는 다음 권한 집합이 있어야 합니다.:
- "Actions" repository permissions (read)
공용 리소스만 요청되는 경우 인증 또는 앞서 언급한 권한 없이 이 엔드포인트를 사용할 수 있습니다.
"Get a workflow"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept stringSetting to |
속성, 형식, 설명 |
---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository without the |
workflow_id RequiredThe ID of the workflow. You can also pass the workflow file name as a string. |
"Get a workflow"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
"Get a workflow"에 대한 코드 샘플
요청 예제
curl -L \ -H "Accept: application/vnd.+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X--Api-Version: 2022-11-28" \ https://api..com/repos/OWNER/REPO/actions/workflows/WORKFLOW_ID
Response
Status: 200
{ "id": 161335, "node_id": "MDg6V29ya2Zsb3cxNjEzMzU=", "name": "CI", "path": "./workflows/blank.yaml", "state": "active", "created_at": "2020-01-08T23:48:37.000-08:00", "updated_at": "2020-01-08T23:50:21.000-08:00", "url": "https://api..com/repos/octo-org/octo-repo/actions/workflows/161335", "html_url": "https://.com/octo-org/octo-repo/blob/master/./workflows/161335", "badge_url": "https://.com/octo-org/octo-repo/workflows/CI/badge.svg" }
Disables a workflow and sets the state
of the workflow to disabled_manually
. You can replace workflow_id
with the workflow file name. For example, you could use main.yaml
.
OAuth tokens and personal access tokens (classic) need the repo
scope to use this endpoint.
"Disable a workflow"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰에는 다음 권한 집합이 있어야 합니다.:
- "Actions" repository permissions (write)
"Disable a workflow"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept stringSetting to |
속성, 형식, 설명 |
---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository without the |
workflow_id RequiredThe ID of the workflow. You can also pass the workflow file name as a string. |
"Disable a workflow"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
204 | No Content |
"Disable a workflow"에 대한 코드 샘플
요청 예제
curl -L \ -X PUT \ -H "Accept: application/vnd.+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X--Api-Version: 2022-11-28" \ https://api..com/repos/OWNER/REPO/actions/workflows/WORKFLOW_ID/disable
Response
Status: 204
You can use this endpoint to manually trigger a Actions workflow run. You can replace workflow_id
with the workflow file name. For example, you could use main.yaml
.
You must configure your Actions workflow to run when the workflow_dis
webhook event occurs. The inputs
are configured in the workflow file. For more information about how to configure the workflow_dis
event in the workflow file, see "Events that trigger workflows."
OAuth tokens and personal access tokens (classic) need the repo
scope to use this endpoint.
"Create a workflow dis event"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰에는 다음 권한 집합이 있어야 합니다.:
- "Actions" repository permissions (write)
"Create a workflow dis event"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept stringSetting to |
속성, 형식, 설명 |
---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository without the |
workflow_id RequiredThe ID of the workflow. You can also pass the workflow file name as a string. |
속성, 형식, 설명 |
---|
ref string RequiredThe git reference for the workflow. The reference can be a branch or tag name. |
inputs objectInput keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when |
"Create a workflow dis event"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
204 | No Content |
"Create a workflow dis event"에 대한 코드 샘플
요청 예제
curl -L \ -X POST \ -H "Accept: application/vnd.+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X--Api-Version: 2022-11-28" \ https://api..com/repos/OWNER/REPO/actions/workflows/WORKFLOW_ID/dises \ -d '{"ref":"topic-branch","inputs":{"name":"Mona the Octocat","home":"San Francisco, CA"}}'
Response
Status: 204
Enables a workflow and sets the state
of the workflow to active
. You can replace workflow_id
with the workflow file name. For example, you could use main.yaml
.
OAuth tokens and personal access tokens (classic) need the repo
scope to use this endpoint.
"Enable a workflow"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰에는 다음 권한 집합이 있어야 합니다.:
- "Actions" repository permissions (write)
"Enable a workflow"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept stringSetting to |
속성, 형식, 설명 |
---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository without the |
workflow_id RequiredThe ID of the workflow. You can also pass the workflow file name as a string. |
"Enable a workflow"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
204 | No Content |
"Enable a workflow"에 대한 코드 샘플
요청 예제
curl -L \ -X PUT \ -H "Accept: application/vnd.+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X--Api-Version: 2022-11-28" \ https://api..com/repos/OWNER/REPO/actions/workflows/WORKFLOW_ID/enable
Response
Status: 204
Warning
This endpoint is in the process of closing down. Refer to "Actions Get workflow usage and Get workflow run usage endpoints closing down" for more information.
Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use -hosted runners. Usage is listed for each -hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "Managing billing for Actions".
You can replace workflow_id
with the workflow file name. For example, you could use main.yaml
.
Anyone with read access to the repository can use this endpoint.
OAuth app tokens and personal access tokens (classic) need the repo
scope to use this endpoint with a private repository.
"Get workflow usage"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰에는 다음 권한 집합이 있어야 합니다.:
- "Actions" repository permissions (read)
공용 리소스만 요청되는 경우 인증 또는 앞서 언급한 권한 없이 이 엔드포인트를 사용할 수 있습니다.
"Get workflow usage"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept stringSetting to |
속성, 형식, 설명 |
---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository without the |
workflow_id RequiredThe ID of the workflow. You can also pass the workflow file name as a string. |
"Get workflow usage"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
"Get workflow usage"에 대한 코드 샘플
요청 예제
curl -L \ -H "Accept: application/vnd.+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X--Api-Version: 2022-11-28" \ https://api..com/repos/OWNER/REPO/actions/workflows/WORKFLOW_ID/timing
Response