Update custom properties for all repos in an organization from a YAML file.
This action uses the GitHub CLI to read values from repo-properties.yaml
and update repos in the organization. This
can be useful for easily maintaining a single source of truth and a git-based history of updates to the
custom properties of the organization.
- Add this GitHub Action to your workflow.
- Run the workflow. The file
repo-properties.yaml
will automatically be parsed and all appropriate repo values will be updated.
To run the action within your GitHub CI/CD pipeline you will need to create a fine-grained token with the following permissions:
- Read and Write access to repository custom properties
- GitHub API for custom property for an organization
- Fine-grained personal access tokens
- The owner of the fine-grained token must have full administrative rights to the organization.
Name | Description | Required | Default |
---|---|---|---|
token |
GitHub Personal Access Token (Fine-Grained with: Repository custom properties Read and Write scope) |
β Yes | β |
repo-properties.yaml |
File should be located in the root-level directory. | β Yes | repo-properties.yaml |
jobs:
update-schema:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: PandasWhoCode/update-custom-properties@v1
with:
token: ${{ secrets.GH_CUSTOM_PROPERTIES_TOKEN }}
repo-properties.yaml
:
org: PandasWhoCode
repositories:
- name: my-example-repo
last-date-modified: ""
initial-ci-review-by-team: "pandas"
initial-ci-review-date: "2025-04-07"
initial-security-review-by-team: "admins"
initial-security-review-date: "2025-04-15"
last-security-review-by-team: "reviewers"
last-security-review-date: "2025-05-01"
Andrew Brandt