generated from actions/javascript-action
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improving documentation based on feedback (#148)
Co-authored-by: Waldir Pimenta <waldyrious@gmail.com>
- Loading branch information
1 parent
d17ffc1
commit c15a4b4
Showing
6 changed files
with
81 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
```yaml | ||
name: "Different Changelog Path" | ||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] | ||
jobs: | ||
# Enforces the update of a changelog file on every pull request | ||
changelog: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dangoslen/changelog-enforcer@v2 | ||
with: | ||
changeLogPath: 'different/changelog.md' | ||
``` |
25 changes: 25 additions & 0 deletions
25
example-workflows/with-expected-latest-version-custom-pattern.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
```yaml | ||
name: "Checking for Expected Latest Version and Custom Version Pattern" | ||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] | ||
jobs: | ||
# Enforces the update of a changelog file on every pull request | ||
changelog: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2.3.4 | ||
- id: read-version | ||
run: | | ||
echo "::set-output name=version::$(jq -r ".version" package.json)" | ||
- id: changelog-enforcer | ||
uses: ./ | ||
with: | ||
skipLabels: "skip-changelog" | ||
# Anything within brackets that starts with `*` | ||
versionPattern: " ^\\* \\[(.*)\\]" | ||
expectedLatestVersion: ${{ steps.read-version.outputs.tag }} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
```yaml | ||
name: "Checking for Expected Latest Version" | ||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] | ||
jobs: | ||
# Enforces the update of a changelog file on every pull request | ||
changelog: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2.3.4 | ||
- id: read-version | ||
run: | | ||
echo "::set-output name=version::$(jq -r ".version" package.json)" | ||
- id: changelog-enforcer | ||
uses: ./ | ||
with: | ||
skipLabels: "skip-changelog" | ||
expectedLatestVersion: ${{ steps.read-version.outputs.tag }} | ||
``` |