{"id":21575551,"url":"https://github.com/rangle/gitub-action-template-example","last_synced_at":"2025-03-18T06:45:42.308Z","repository":{"id":102476627,"uuid":"346771569","full_name":"rangle/gitub-action-template-example","owner":"rangle","description":"Example of setting up Github action workflow templates within Organization","archived":false,"fork":false,"pushed_at":"2021-03-11T17:00:29.000Z","size":3,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-01-24T13:32:11.727Z","etag":null,"topics":["github-actions"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rangle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-03-11T16:46:49.000Z","updated_at":"2024-06-09T19:17:18.000Z","dependencies_parsed_at":"2023-04-04T20:03:59.781Z","dependency_job_id":null,"html_url":"https://github.com/rangle/gitub-action-template-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rangle%2Fgitub-action-template-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rangle%2Fgitub-action-template-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rangle%2Fgitub-action-template-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rangle%2Fgitub-action-template-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rangle","download_url":"https://codeload.github.com/rangle/gitub-action-template-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244173507,"owners_count":20410295,"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":["github-actions"],"created_at":"2024-11-24T12:13:35.946Z","updated_at":"2025-03-18T06:45:42.291Z","avatar_url":"https://github.com/rangle.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Github Action Workflow Examples\n\n## Usage\n\n### Sharing Github Action Workflows within Organization\n\nThere are a few steps to create Github Action templates for an organization.\n\n1. Create a new public repository named `.github` in the organization\n2. Create a directory named `workflow-templates` within the `.github` repo\n3. Create a new workflow file inside the `workflow-templates` directory. For example, I created a workflow file named `angular-ci.yml` inside the `workflow-templates` folder\n\n```yaml\n# A workflow template for Angular project\n\nname: CI\n\n# the placeholder `$default-branch` will be automatically replaced with\n# the name of the repository's default branch, e.g. main\non:\n  push:\n    branches: [$default-branch]\n  pull_request:\n    branches: [$default-branch]\n\njobs:\n  test:\n    name: Test and Build\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        node: [10.x]\n    steps:\n      - name: Checkout Code\n        uses: actions/checkout@v2\n\n      - name: Use Node.js ${{ matrix.node }}\n        uses: actions/setup-node@v2\n        with:\n          node-version: ${{ matrix.node }}\n\n      - name: Install dependencies\n        run: npm ci\n\n      - name: Lint\n        run: npm run lint\n\n      - name: Test\n        run: npm run ng -- test --watch=false --progress=false --sourceMap=false --browsers=ChromeHeadless\n```\n\n4. Create a metadata file inside the `workflow-templates` directory. The metadata file must have the same name as the workflow file, and it must be appended with `.properties.json`. For example, I created this file `angular-ci.properties.json` that describes my workflow template `angular-ci.yml` within the `workflow-templates` folder.\n\n```json\n{\n  \"name\": \"Angular CI Workflow\",\n  \"description\": \"CI workflow template for Angular projects.\",\n  \"iconName\": \"example-icon\",\n  \"categories\": [\"TypeScript\"],\n  \"filePatterns\": [\"package.json$\"]\n}\n```\n\n## Using a workflow template from your organization\n\n1. Those who want to use the Github Actions template can navigate to their repository's main page and click on the `Actions` tab.\n\n2. Developers can choose a workflow template from the organization and click **Set up this workflow.**\n\n3. As soon as the change is committed and pushed to the default branch (`master` in this example), the workflow will run automatically.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frangle%2Fgitub-action-template-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frangle%2Fgitub-action-template-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frangle%2Fgitub-action-template-example/lists"}