You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GitHub Enterprise Server deployments require routing API calls to a custom
endpoint instead of the default GitHub.com API.
This commit adds a new 'github_api_url' action input and passes it to Octokit as
baseUrl so check run calls target the configured GitHub API host. Additionally,
it documents the input in README and adds a test case that validates requests
using /api/v3 when a custom API URL is provided.
Copy file name to clipboardExpand all lines: README.md
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,28 @@ jobs:
29
29
30
30
See the [examples workflow](.github/workflows/examples.yml) for more details and examples (and see the [associated runs](https://github.com/LouisBrunner/checks-action/actions?query=workflow%3Aexamples) to see how it will look like).
31
31
32
+
### GitHub Enterprise Server
33
+
34
+
When running on GitHub Enterprise Server, set `github_api_url` to your instance API endpoint:
35
+
36
+
```yaml
37
+
name: "build-test"
38
+
on: [push]
39
+
40
+
jobs:
41
+
test_something:
42
+
runs-on: ubuntu-latest
43
+
steps:
44
+
- uses: actions/checkout@v1
45
+
- uses: LouisBrunner/checks-action@v2.0.0
46
+
if: always()
47
+
with:
48
+
token: ${{ secrets.GITHUB_TOKEN }}
49
+
github_api_url: https://github.example.com/api/v3
50
+
name: Test XYZ
51
+
conclusion: ${{ job.status }}
52
+
```
53
+
32
54
### Permissions
33
55
34
56
When the action is run as part of a Pull Request, your workflow might fail with the following error: `Error: Resource not accessible by integration`.
@@ -80,6 +102,10 @@ _Optional_ The SHA of the target commit. Defaults to the current commit.
80
102
81
103
**Required** Your `GITHUB_TOKEN`
82
104
105
+
### `github_api_url`
106
+
107
+
_Optional_ The base API URL to use for GitHub API requests. Useful for GitHub Enterprise Server, e.g. `https://github.example.com/api/v3`.
108
+
83
109
### `name`
84
110
85
111
**Required** for creation, the name of the check to create (mutually exclusive with `check_id`)
0 commit comments