Skip to content

Commit 56bf3f1

Browse files
committed
docs: update readme
Signed-off-by: Andrew Brandt <[email protected]>
1 parent 2009314 commit 56bf3f1

File tree

1 file changed

+79
-2
lines changed

1 file changed

+79
-2
lines changed

README.md

Lines changed: 79 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,80 @@
1-
# read-all-custom-properties
1+
# README for the project Read All Custom Properties
22

3-
Github Action to read all custom properties from all repos in an organization.
3+
**Read all custom properties and values from all repos in the organization and write to a file.**
4+
5+
This action uses the GitHub CLI to read all properties from all repos in the organization. It can write
6+
the results to a `repo-properties.yaml` file as well, for use with input to
7+
[update custom properties](https://github.com/PandasWhoCode/update-custom-properties) action.
8+
9+
---
10+
11+
## 🚀 Getting Started
12+
13+
1. Add this GitHub Action to your workflow.
14+
2. Run the workflow. A new commit will be generated on the branch you run it from containing the `repo-properties.yaml`
15+
file.
16+
17+
---
18+
19+
## Fine Grained Token Requirements
20+
21+
To run the action within your Github CI/CD pipeline you will need to create a
22+
fine-grained token with the following permissions:
23+
24+
### Organization Permissions
25+
26+
- Read access to organization custom properties
27+
28+
### Additional Information
29+
30+
- [Github API for custom property for an organization](https://docs.github.com/en/rest/orgs/custom-properties?apiVersion=2022-11-28#create-or-update-a-custom-property-for-an-organization)
31+
- [Fine-grained personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token)
32+
- The owner of the fine-grained token must have full administrative rights to the organization.
33+
34+
---
35+
36+
## 📦 Inputs
37+
38+
| Name | Description | Required | Default |
39+
|---------------------------|------------------------------------------------------------------------|-----|---------|
40+
| `token` | GitHub Personal Access Token (Fine-Grained with `Read` org scope) | ✅ Yes ||
41+
| `overwrite-existing-file` | Boolean for choosing to overwrite `repo-properties.json`, if it exists | 🟥 No | `false` |
42+
| `dry-run-enabled` | Flag to dry-run the script, will not commit in repo. | 🟥 No | `false` |
43+
| `commit-author-name` | Author Name on the commit that will be created | ✅ Yes | - |
44+
| `commit-author-email` | Author Email on the commit that will be created | ✅ Yes | - |
45+
| `commit-author-gpg-key-contents` | GPG Key for the commit that will be created (must match the `email`) | ✅ Yes | - |
46+
| `commit-author-gpg-key-passphrase` | GPG Key Passphrase for the key to sign the commit that will be created | ✅ Yes | - |
47+
48+
---
49+
50+
## 🛠 Usage
51+
52+
```yaml
53+
jobs:
54+
update-schema:
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v4
58+
59+
- uses: PandasWhoCode/read-all-custom-properties@1-create-an-action-to-read-all-custom-properties
60+
with:
61+
token: ${{ secrets.GH_CUSTOM_PROPS_TOKEN_WRITABLE }}
62+
overwrite-existing-file: ${{ inputs.overwrite-existing-file }}
63+
dry-run-enabled: ${{ inputs.dry-run-enabled }}
64+
commit-author-name: ${{ inputs.commit-author-name }}
65+
commit-author-email: ${{ inputs.commit-author-email }}
66+
commit-author-gpg-key-contents: ${{ secrets.GPG_KEY_CONTENTS }}
67+
commit-author-gpg-key-passphrase: ${{ secrets.GPG_KEY_PASSPHRASE }}
68+
```
69+
70+
---
71+
72+
## 👤 Author
73+
74+
Andrew Brandt
75+
76+
[PandasWhoCode](https://pandaswhocode.com)
77+
78+
79+
80+
---

0 commit comments

Comments
 (0)