{"id":20464775,"url":"https://github.com/crdsonnet/github-actions-libsonnet","last_synced_at":"2025-03-05T12:22:13.517Z","repository":{"id":246822500,"uuid":"699908819","full_name":"crdsonnet/github-actions-libsonnet","owner":"crdsonnet","description":"Jsonnet library for generating Github Actions workflows.","archived":false,"fork":false,"pushed_at":"2024-11-01T15:05:17.000Z","size":239,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-16T01:14:49.370Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jsonnet","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crdsonnet.png","metadata":{"files":{"readme":"docs/README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-03T15:18:01.000Z","updated_at":"2024-11-01T15:05:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"41534698-2861-497a-b36a-244f59fe3faf","html_url":"https://github.com/crdsonnet/github-actions-libsonnet","commit_stats":null,"previous_names":["crdsonnet/github-actions-libsonnet"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crdsonnet%2Fgithub-actions-libsonnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crdsonnet%2Fgithub-actions-libsonnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crdsonnet%2Fgithub-actions-libsonnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crdsonnet%2Fgithub-actions-libsonnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crdsonnet","download_url":"https://codeload.github.com/crdsonnet/github-actions-libsonnet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242024200,"owners_count":20059487,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T13:16:27.263Z","updated_at":"2025-03-05T12:22:13.487Z","avatar_url":"https://github.com/crdsonnet.png","language":"Jsonnet","funding_links":[],"categories":[],"sub_categories":[],"readme":"# github-actions-libsonnet\n\nJsonnet library to create GitHub actions workflows.\n## Install\n\n```\njb install github.com/crdsonnet/github-actions-libsonnet@main\n```\n\n## Usage\n\n```jsonnet\nlocal ga = import 'github.com/crdsonnet/github-actions-libsonnet/main.libsonnet';\n\nlocal exampleWorkflow =\n  ga.workflow.withName('example workflow')\n  + ga.workflow.on.pull_request.withBranches(['main'])\n  + ga.workflow.withJobs({\n    example:\n      ga.job.withRunsOn('ubuntu-latest')\n      + ga.job.withSteps([\n        ga.job.step.withName('Checkout')\n        + ga.job.step.withUses('actions/checkout@v4'),\n      ]),\n  });\n\nga.util.manifestWorkflow(exampleWorkflow)\n```\n\nThis can be rendered into a Yaml file like so:\n\n```console\njsonnet -S workflow.jsonnet\n```\n\nThe output will look like this:\n```yaml\nname: \"example workflow\"\n\non:\n  pull_request:\n    branches:\n      - \"main\"\n\njobs:\n  example:\n    runs-on: \"ubuntu-latest\"\n    steps:\n      - name: \"Checkout\"\n        uses: \"actions/checkout@v4\"\n```\n\n\n## Subpackages\n\n* [action](action/index.md)\n* [job](job/index.md)\n* [util](util.md)\n* [workflow](workflow.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrdsonnet%2Fgithub-actions-libsonnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrdsonnet%2Fgithub-actions-libsonnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrdsonnet%2Fgithub-actions-libsonnet/lists"}