Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
git-branch

GitHub Action

Template Repository Usage Action

v0.0.1 Pre-release

Template Repository Usage Action

git-branch

Template Repository Usage Action

A GitHub action to automatically update a template repository README with a list of repos that used it in an organisation

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Template Repository Usage Action

uses: maael/[email protected]

Learn more about this action in maael/template-repository-usage-action

Choose a version

typescript-action status

Template Repository Usage GitHub Action

A GitHub action to automatically update a template repository README with a list of repos that used it in an organisation.

Code in Main

Install the dependencies

$ npm install

Build the typescript and package it for distribution

$ npm run build && npm run package

Run the tests ✔️

$ npm test

 PASS  ./index.test.js
  ✓ throws invalid number (3ms)
  ✓ wait 500 ms (504ms)
  ✓ test runs (95ms)

...

Publish to a distribution branch

Actions are run from GitHub repos so we will checkin the packed dist folder.

Then run ncc and push the results:

$ npm run package
$ git add dist
$ git commit -a -m "prod dependencies"
$ git push origin releases/v1

The action is now published! 🚀

See the versioning documentation

Validate

You can now validate the action by referencing ./ in a workflow in your repo (see test.yml)

uses: ./
with:
  milliseconds: 1000

See the actions tab for runs of this action! 🚀

Usage:

After testing you can create a v1 tag to reference the stable and latest V1 action