# 🚧 GitHub Actions CDK
**github-actions-cdk** is a TypeScript library that simplifies the creation and management of GitHub Actions workflows using Constructs. With this library, developers can define workflows in a structured and type-safe manner, making it easier to automate CI/CD pipelines on GitHub.
## Features
* **Type-Safe Workflows**: Leverage TypeScript's strong typing to define your GitHub Actions workflows and ensure correctness.
* **Modular Design**: Easily create and manage jobs, triggers, and options for your workflows.
* **Built-In Support for GitHub Events**: Configure workflows based on various GitHub events such as push, pull request, issue comments, and more.
* **Customizable Options**: Define environment variables, permissions, concurrency settings, and default job settings.
## Installation
To get started with `github-actions-cdk`, install the package using npm or yarn:
```bash
npm install github-actions-cdk
```
or
```bash
yarn add github-actions-cdk
```
## Getting Started
### Basic Usage
Here's a simple example of how to create a GitHub Actions workflow using `github-actions-cdk`:
```python
import { PermissionLevel, Project } from 'github-actions-cdk';
import { Checkout, SetupNode } from 'github-actions-cdk/actions';
const project = new Project();
const workflow = project.addWorkflow('build', {
name: "Build",
triggers: {
push: { branches: ['main'] },
workflowDispatch: {}
},
permissions: {
contents: PermissionLevel.READ,
}
});
const job = workflow.addJob('build', {
env: {
CI: 'true',
},
});
job.addAction(
new Checkout("checkout", {
name: "Checkout Code",
version: "v4",
}),
);
job.addAction(
new SetupNode("setup-node", {
name: "Set up Node.js",
version: "v4",
nodeVersion: "20.x",
}),
);
project.synth();
```
## Contributing
Contributions are welcome! Please read the [CONTRIBUTING.md](./CONTRIBUTING.md) for details on how to get involved.
## License
This project is licensed under the MIT License. See the [LICENSE](./LICENCE) file for more information.
Raw data
{
"_id": null,
"home_page": "https://github.com/hupe1980/github-actions-cdk.git",
"name": "github-actions-cdk",
"maintainer": null,
"docs_url": null,
"requires_python": "~=3.8",
"maintainer_email": null,
"keywords": null,
"author": "hupe1980",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/4d/07/37fb2250ac74aaf2159ff75df1944be07f8b40a63afe476bf3fb65c5ddad/github_actions_cdk-0.0.10.tar.gz",
"platform": null,
"description": "# \ud83d\udea7 GitHub Actions CDK\n\n**github-actions-cdk** is a TypeScript library that simplifies the creation and management of GitHub Actions workflows using Constructs. With this library, developers can define workflows in a structured and type-safe manner, making it easier to automate CI/CD pipelines on GitHub.\n\n## Features\n\n* **Type-Safe Workflows**: Leverage TypeScript's strong typing to define your GitHub Actions workflows and ensure correctness.\n* **Modular Design**: Easily create and manage jobs, triggers, and options for your workflows.\n* **Built-In Support for GitHub Events**: Configure workflows based on various GitHub events such as push, pull request, issue comments, and more.\n* **Customizable Options**: Define environment variables, permissions, concurrency settings, and default job settings.\n\n## Installation\n\nTo get started with `github-actions-cdk`, install the package using npm or yarn:\n\n```bash\nnpm install github-actions-cdk\n```\n\nor\n\n```bash\nyarn add github-actions-cdk\n```\n\n## Getting Started\n\n### Basic Usage\n\nHere's a simple example of how to create a GitHub Actions workflow using `github-actions-cdk`:\n\n```python\nimport { PermissionLevel, Project } from 'github-actions-cdk';\nimport { Checkout, SetupNode } from 'github-actions-cdk/actions';\n\nconst project = new Project();\n\nconst workflow = project.addWorkflow('build', {\n name: \"Build\",\n triggers: {\n push: { branches: ['main'] },\n workflowDispatch: {}\n },\n permissions: {\n contents: PermissionLevel.READ,\n }\n});\n\nconst job = workflow.addJob('build', {\n\tenv: {\n\t\tCI: 'true',\n\t},\n});\n\njob.addAction(\n new Checkout(\"checkout\", {\n name: \"Checkout Code\",\n version: \"v4\",\n }),\n);\n\njob.addAction(\n new SetupNode(\"setup-node\", {\n name: \"Set up Node.js\",\n version: \"v4\",\n nodeVersion: \"20.x\",\n }),\n);\n\nproject.synth();\n```\n\n## Contributing\n\nContributions are welcome! Please read the [CONTRIBUTING.md](./CONTRIBUTING.md) for details on how to get involved.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](./LICENCE) file for more information.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A TypeScript library for creating and managing GitHub Actions workflows using Constructs, enabling type-safe and modular CI/CD automation.",
"version": "0.0.10",
"project_urls": {
"Homepage": "https://github.com/hupe1980/github-actions-cdk.git",
"Source": "https://github.com/hupe1980/github-actions-cdk.git"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b643afd24b702f95ab7de023df1543b8c6c0b4e8f3a9d6a545cd04df80174345",
"md5": "c3a136950483f72b19cb86dd2477e250",
"sha256": "2ff5b209b84449cec951a36f26e5b2ad7dc87a8a14cc2654c2ba57b236e13bbb"
},
"downloads": -1,
"filename": "github_actions_cdk-0.0.10-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c3a136950483f72b19cb86dd2477e250",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "~=3.8",
"size": 237406,
"upload_time": "2024-10-26T15:41:40",
"upload_time_iso_8601": "2024-10-26T15:41:40.943281Z",
"url": "https://files.pythonhosted.org/packages/b6/43/afd24b702f95ab7de023df1543b8c6c0b4e8f3a9d6a545cd04df80174345/github_actions_cdk-0.0.10-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4d0737fb2250ac74aaf2159ff75df1944be07f8b40a63afe476bf3fb65c5ddad",
"md5": "ff8c3b22b50f732cc52b77af6b7b34a5",
"sha256": "5c7e4c805309df9e01fbd6063ae8ff5ad9a4b3becacb173cc8d791ea3d00e13a"
},
"downloads": -1,
"filename": "github_actions_cdk-0.0.10.tar.gz",
"has_sig": false,
"md5_digest": "ff8c3b22b50f732cc52b77af6b7b34a5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "~=3.8",
"size": 239022,
"upload_time": "2024-10-26T15:41:43",
"upload_time_iso_8601": "2024-10-26T15:41:43.299702Z",
"url": "https://files.pythonhosted.org/packages/4d/07/37fb2250ac74aaf2159ff75df1944be07f8b40a63afe476bf3fb65c5ddad/github_actions_cdk-0.0.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-26 15:41:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hupe1980",
"github_project": "github-actions-cdk",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "github-actions-cdk"
}