A GitHub Action to retrieve and validate custom repository properties, exporting them as outputs for your workflows.
- Retrieve custom properties from GitHub repositories
- Export properties as step-outputs for use in subsequent workflow steps
- Structured logs for debugging
- 100% test coverage with Jest
- name: Retrieve Custom Properties
id: gca-properties
uses: GoDllkE/github-properties-as-envs@v1.0.0
with:
github_token: ${{ secrets.some_personal_access_token }}
repository_owner: ${{ github.repository_owner }}
repository_name: ${{ github.event.repository.name }}
validate_properties: true
- name: Use Properties
run: |
echo "Deploy method: ${{ steps.gca-properties.outputs.deploy }}"
echo "Framework: ${{ steps.gca-properties.outputs.framework }}"| Input | Required | Default | Description |
|---|---|---|---|
github_token |
Yes | - | GitHub token (PAT recommended) |
repository_owner |
Yes | - | Repository owner |
repository_name |
Yes | - | Repository name |
- Reusable Workflows: Centralize property management for multiple repositories.
- CI/CD Automation: Use exported properties for deployment, notifications, and more.
git clone https://github.com/GoDllkE/github-properties-as-envs.git
cd github-properties-as-envs
npm install
npm run preparenpm run build- 100% code coverage with Jest
- Unit and integration tests for all core functions
npm testTest structure:
tests/
├── main.test.js
├── getRepositoryProperties.test.js
├── validateInputs.test.js
├── exportGithubOutput.test.js
├── validateCredentials.test.js
├── filterRepoProperties.test.js
├── main.test.js
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License.
Made with ❤️ by GoDllkE