Skip to content

Commit

Permalink
fix(docs): improve and make more consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
dgschwindturo committed Apr 5, 2022
1 parent ce1d2b7 commit 2e6d6bb
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .commitlintrc.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
extends:
- "@commitlint/config-conventional"
- "@open-turo/commitlint-config-conventional"
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repos:
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ["@commitlint/config-conventional"]
additional_dependencies: ["@open-turo/commitlint-config-conventional"]
- repo: https://github.com/rhysd/actionlint
rev: v1.6.8
hooks:
Expand Down
8 changes: 5 additions & 3 deletions lint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ GitHub Action runs lint on a node based GitHub repository
jobs:
build:
steps:
- name: Action lint
- name: Lint
uses: open-turo/actions-node/lint@v1
with:
## example value for github-token provided below
github-token: ${{ secrets.GITHUB_TOKEN }}
```
Note: by default, this action will perform actions/checkout as its first step.
Expand All @@ -18,8 +21,7 @@ Note: by default, this action will perform actions/checkout as its first step.
This action runs the following lint checks:
- [wagoid/commitlint-github-action](https://github.com/wagoid/commitlint-github-action)
- [pre-commit/action](https://github.com/open-turo/action-pre-commit)
- [action-pre-commit](https://github.com/open-turo/action-pre-commit)
## Notes
Expand Down
10 changes: 5 additions & 5 deletions lint/action.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: "node Lint"
description: "Lints node based repository"
name: node Lint
description: Lints node based repository
inputs:
checkout-repo:
required: false
description: "Perform checkout as first step of action"
description: Perform checkout as first step of action
default: "true"
github-token:
required: true
description: "GitHub token that can checkout the repository. e.g. 'secrets.GITHUB_TOKEN'"
description: GitHub token that can checkout the repository. e.g. 'secrets.GITHUB_TOKEN'
node-version:
required: true
description: "The version of Node.js to setup and use with Yarn"
description: The version of Node.js to setup and use with Yarn
default: "16"
runs:
using: composite
Expand Down
24 changes: 8 additions & 16 deletions release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ Note: by default, this action will perform actions/checkout as its first step.

```yaml
steps:
- name: Action semantic release
- name: Release
uses: open-turo/actions-node/release@v1
with:
## example value for github-token provided below
github-token: ${{ secrets.GITHUB_TOKEN }}
## example value for artifactory-npm-auth-token provided below
artifactory-npm-auth-token: ${{ secrets.ANAT }}
```
**IMPORTANT**: `GITHUB_TOKEN` does not have the required permissions to operate on protected branches.
Expand Down Expand Up @@ -48,9 +51,7 @@ Github Action Workflow:

```yaml
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Action Semantic Release
- name: Release
uses: open-turo/actions-node/release@v1
with:
# You can specify specifying version range for the extra plugins if you prefer.
Expand Down Expand Up @@ -80,11 +81,7 @@ Release Config:
jobs:
build:
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Action Semantic Release
- name: Release
uses: open-turo/actions-node/release@v1
with:
dry-run: true
Expand All @@ -106,16 +103,11 @@ jobs:
jobs:
build:
steps:
- uses: open-turo/actions-node/release@v1
id: release # Need an `id` for output variables
with:
fetch-depth: 0
- name: Semantic Release
- name: Release
uses: open-turo/actions-node/release@v1
id: semantic # Need an `id` for output variables
id: release # Need an `id` for output variables
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Do something when a new release published
if: steps.release.outputs.new-release-published == 'true'
run: |
Expand Down
26 changes: 13 additions & 13 deletions release/action.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
name: "GitHub Action Release & Publish"
description: "Publish a new release of the Action - adds a new major tag"
name: GitHub Action Release & Publish
description: Publish a new release of the Action - adds a new major tag
inputs:
checkout-repo:
required: false
description: "Perform checkout as first step of action"
description: Perform checkout as first step of action
default: "true"
github-token:
required: true
description: "GitHub token that can checkout the repository as well as create tags/releases against it. e.g. 'secrets.GITHUB_TOKEN'"
description: GitHub token that can checkout the repository as well as create tags/releases against it. e.g. 'secrets.GITHUB_TOKEN'
node-version:
required: true
description: "The version of Node.js to setup and use with Yarn"
description: The version of Node.js to setup and use with Yarn
default: "16"
artifactory-npm-auth-token:
required: true
description: "The Node Package Manager (npm) authentication token recognized by Artifactory"
description: The Node Package Manager (npm) authentication token recognized by Artifactory
dry-run:
required: false
description: "Whether to run semantic release in `dry-run` mode. It will override the dryRun attribute in your configuration file"
description: Whether to run semantic release in `dry-run` mode. It will override the `dryRun` attribute in your configuration file
extra-plugins:
required: false
description: "Extra plugins for pre-install. You can also specify specifying version range for the extra plugins if you prefer."
description: Extra plugins for pre-install. You can also specify specifying version range for the extra plugins if you prefer.
outputs:
new-release-published:
description: "Whether a new release was published"
value: ${{ steps.release.outputs.new_release_published }}
description: Whether a new release was published
value: ${{ steps.release.outputs.new-release-published }}
new-release-version:
description: "Version of the new release"
value: ${{ steps.release.outputs.new_release_version }}
description: Version of the new release
value: ${{ steps.release.outputs.new-release-version }}
new-release-major-version:
description: "Major version of the new release"
description: Major version of the new release
value: ${{ steps.release.outputs.release-major }}
runs:
using: composite
Expand Down
3 changes: 3 additions & 0 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ jobs:
steps:
- name: Test
uses: open-turo/actions-node/test@v1
with:
## example value for github-token provided below
github-token: ${{ secrets.GITHUB_TOKEN }}
```
Note: by default, this action will perform actions/checkout as its first step.
Expand Down
12 changes: 5 additions & 7 deletions test/action.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
name: "node Test"
description: "Tests node based repository"
name: node Test
description: Tests node based repository
inputs:
checkout-repo:
required: false
description: "Perform checkout as first step of action"
description: Perform checkout as first step of action
default: "true"
github-token:
required: true
description: "GitHub token that can checkout the repository. e.g. 'secrets.GITHUB_TOKEN'"
description: GitHub token that can checkout the repository. e.g. 'secrets.GITHUB_TOKEN'
node-version:
required: true
description: "The version of Node.js to setup and use with Yarn"
description: The version of Node.js to setup and use with Yarn
default: "16"
runs:
using: composite
steps:
- name: Checkout
uses: actions/checkout@v2
if: inputs.checkout-repo
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v2
with:
Expand Down

0 comments on commit 2e6d6bb

Please sign in to comment.