Skip to content

Commit c1a66f9

Browse files
joshjohanningstoeCopilot
authored
Set a default for the API endpoint URL (#146)
* docs: update actions * feat: set default for gh_api_url * fix: setup-node shouldn't be needed to run this action is already compiled * docs: updates * Update readme.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Stefan Stölzle <stoe@github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 948178e commit c1a66f9

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ inputs:
1717
required: false
1818
gh_api_url:
1919
description: 'GitHub Enterprise Server API URL'
20+
default: ${{ github.api_url }}
2021
required: false
2122

2223
runs:

readme.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,15 @@ jobs:
2222

2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@v2.3.4
26-
27-
- name: Setup node
28-
uses: actions/setup-node@v2.1.5
29-
with:
30-
node-version: 14.x
25+
uses: actions/checkout@v5.0.0
3126

3227
- name: Deploy GitHub Actions allow list
33-
uses: ActionsDesk/github-actions-allow-list-as-code-action@v1.1.2
28+
uses: ActionsDesk/github-actions-allow-list-as-code-action@v3.0.0
3429
with:
3530
token: ${{ secrets.ENTERPRISE_ADMIN_TOKEN }}
3631
enterprise: 'your-enterprise'
3732
# same as defined under `on.pull_requests.paths`
3833
allow_list_path: github-actions-allow-list.yml
39-
# gh_api_url: 'https://github.example.com/api/v3' # Only required for GitHub Enterprise Server
4034
```
4135
4236
### Action Inputs
@@ -47,7 +41,7 @@ jobs:
4741
| `organization` | GitHub organization slug | | `false` |
4842
| `enterprise` | GitHub Enterprise account slug | | `false` |
4943
| `allow_list_path` | Path to the GitHub Actions allow list YML within the repository | `github-actions-allow-list.yml` | `false` |
50-
| `gh_api_url` | GitHub Enterprise Servier - URL to the GitHub API endpoint. <br /> Example: `https://github.example.com/api/v3.` | `https://api.github.com` | `false` |
44+
| `gh_api_url` | GitHub Enterprise Server - URL to the GitHub API endpoint. <br /> Example: `https://github.example.com/api/v3.` | `${{ github.api_url }}` | `false` |
5145

5246
ℹ️ Notes for providing `enterprise` or `organization`:
5347

@@ -57,12 +51,14 @@ jobs:
5751

5852
## Allow List file
5953

60-
Example content for Allow List file containing `actions:` key and list with two allowed actions.
54+
Example content for Allow List file containing `actions:` key and list with two allowed actions with specific versions, one wildcard entry for an entire org, and one wildcard entry for all versions of a specific action:
6155

6256
```yml
6357
actions:
64-
- actionsdesk/github-actions-allow-list-as-code-action@v1.1.2
65-
- hashicorp/vault-action@v2.4.0
58+
- actionsdesk/github-actions-allow-list-as-code-action@v3.0.0
59+
- hashicorp/vault-action@v2.7.4
60+
- aquasecurity/tfsec-sarif-action@*
61+
- azure/*
6662
```
6763

6864
## License

0 commit comments

Comments
 (0)