https://github.com/nvdaes/get-repository-id
Gets the global node ID of a repository
https://github.com/nvdaes/get-repository-id
Last synced: 2 months ago
JSON representation
Gets the global node ID of a repository
- Host: GitHub
- URL: https://github.com/nvdaes/get-repository-id
- Owner: nvdaes
- License: mit
- Created: 2023-11-26T06:58:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-09T10:05:16.000Z (over 1 year ago)
- Last Synced: 2025-03-14T18:59:36.430Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 1.06 MB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Get Repository Global Node ID action
This action gets the
[global node ID](https://docs.github.com/en/graphql/guides/using-global-node-ids)
of the specified GitHub repository.
It can be used in other actions, to make calls to the
[GitHub GraphQL API](https://docs.github.com/en/graphql/overview/public-schema).
Note that the global node ID of a repository is not the same as its repository
ID (i.e.,
[`GITHUB_REPOSITORY_ID`](https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables)).
## Inputs
### `repository`
A repository to get its ID. Default `${{ github.repository }}`.
### `token`
GitHub token. Defaults `${{ github.token }}`.
## Outputs
### `repo-id`
The global node ID of the specified repository.
## Example usage
```yaml
- name: Get global node ID
id: get-repo-id
uses: nvdaes/get-repository-id@v1
with:
repository: owner/repo
- name: Print Output
id: output
run: echo "${{ steps.get-repo-id.outputs.repo-id }}"
```