Skip to content

Commit

Permalink
ci: update action docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tagoro9 committed Dec 15, 2023
1 parent ffb1ba3 commit e757788
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 10 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,10 @@ repos:
rev: v1.6.26
hooks:
- id: actionlint
- repo: local
hooks:
- id: update-action-readme
name: update-action-readme
entry: ./script/update-action-readme
language: script
files: '.*action\.yaml$'
33 changes: 23 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# `open-turo/action-git-auth`

This [GitHub Action](https://docs.github.com/en/actions) provides a way to
configure credentials for any utility that uses the git command, or any utility
that uses the git command as a subprocess, or any utility that uses the git
configuration file in its authentication and cloning.
<!-- prettier-ignore-start -->
<!-- action-docs-description -->
## Description

This [GitHub Action](https://docs.github.com/en/actions) provides a way to configure credentials for any utility that uses the git command, or any utility that uses the git command as a subprocess, or any utility that uses the git configuration file in its authentication and cloning.
<!-- action-docs-description -->
<!-- prettier-ignore-end -->

Authenticates using URL patterns that match https://_server_/_prefix_\*. If no
matching URL exists, the action will not use the authentication credentials
Expand Down Expand Up @@ -73,17 +76,27 @@ jobs:
${{ secrets.PERSONAL_ACCESS_TOKEN }}
```
<!-- prettier-ignore-start -->
<!-- action-docs-inputs -->
## Inputs
| parameter | description | required | default |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
| github-personal-access-token | A GitHub personal access token that has appropriate access in the consumer GitHub repository that will be used for authentication with GitHub. | `true` | |
| prefix | The prefix to use for the URL path rewrite. This will often be an organization name if you wish to limit which repositories are accessible. | `false` | |
| server | The name of the GitHub server to use, if not using hosted. This is useful if you are running this action against a GitHub Enterprise instance. | `false` | |
| parameter | description | required | default |
| --- | --- | --- | --- |
| github-personal-access-token | A GitHub personal access token that has appropriate access in the consumer GitHub repository that will be used for authentication with GitHub. | `true` | |
| prefix | The prefix to use for the URL path rewrite. This will often be an organization name if you wish to limit which repositories are accessible. | `false` | |
| server | The name of the GitHub server to use, if not using hosted. This is useful if you are running this action against a GitHub Enterprise instance. | `false` | |
<!-- action-docs-inputs -->

<!-- action-docs-outputs -->

<!-- action-docs-outputs -->

<!-- action-docs-runs -->
## Runs

This action is an `node16` action.
This action is a `node20` action.
<!-- action-docs-runs -->
<!-- prettier-ignore-end -->

## Development

Expand Down
14 changes: 14 additions & 0 deletions script/update-action-readme
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

set -e

for i in $*; do
# ignore if the file does not end with /action.yaml
if [[ "$i" != *"action.yaml" ]]; then
echo "skipping: ${i}"
continue
fi
readme_file=$(dirname "$i")/README.md
echo "npx action-docs --no-banner -a "${i}" --update-readme "${readme_file}""
npx action-docs --no-banner -a "${i}" --update-readme "${readme_file}"
done

0 comments on commit e757788

Please sign in to comment.