Skip to content

Commit

Permalink
added: 📝 example reference to the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
scottwestover committed Nov 23, 2021
1 parent ef4f6e6 commit e445dd1
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
# Shared Workflows

> Shared [Reusable GitHub Workflows](https://docs.github.com/en/actions/learn-github-actions/reusing-workflows#overview) for my projects
## Usage

To use the shared workflow, you need to use the `uses` keyword when referring to a `job` in the workflow. As an example: `jobs.<job_id>.uses`.

Here is an example workflow file:

```yaml
name: Publish NPM Package

on:
push:
branches:
- main
workflow_dispatch:

jobs:
npm-publish:
uses: devshareacademy/shared-workflows/.github/workflows/publish-package.yml@main
secrets:
npm_token: ${{ secrets.NPM_TOKEN }}
gh_token: ${{ secrets.GH_TOKEN }}
```
*Note:* For more information on calling a reusable workflow, please see the following: [Calling Reusable Workflows](https://docs.github.com/en/actions/learn-github-actions/reusing-workflows#calling-a-reusable-workflow).

0 comments on commit e445dd1

Please sign in to comment.