Skip to content

Commit 6b0651f

Browse files
authored
Fix require-changelog-entry temporary checkout steps (#33)
* fix GHA README examples * add checkout_path to require-changelog-entry * reference inputs correctly * add changelog entry
1 parent ef23f1f commit 6b0651f

File tree

4 files changed

+19
-7
lines changed

4 files changed

+19
-7
lines changed

autoreleaser/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
id: changelog
3131
uses: lockerstock/github-actions/autoreleaser@main
3232
with:
33-
token: ${{ secret.GITHUB_TOKEN }}
33+
token: ${{ secrets.GITHUB_TOKEN }}
3434
changelog_path: CHANGELOG.md
3535
```
3636

require-changelog-entry/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
id: changelog
2424
uses: lockerstock/github-actions/require-changelog-entry@main
2525
with:
26-
token: ${{ secret.GITHUB_TOKEN }}
26+
token: ${{ secrets.GITHUB_TOKEN }}
2727
changelog_path: CHANGELOG.md
2828

2929
- name: 'Error if no Changelog entry'
@@ -40,6 +40,7 @@ jobs:
4040
| - | - | - | - |
4141
| token | GITHUB_TOKEN to access the GitHub API if the repository is private | `true` | |
4242
| default_branch | Default branch to compare the "Unreleased" section of the CHANGELOG to. | `false` | ${{ github.event.repository.default_branch }} |
43+
| checkout_path | This action checks out the repository for the current SHA as well as from the default branch. This path indicates where to checkout the repositories as to not clash with any other work in the workflow. | `false` | temp/require-changelog-entry |
4344
| tag_prefix | Optional prefix string to apply to tag search | `false` | |
4445
| tag_suffix | Optional suffix string to apply to tag search | `false` | |
4546
| changelog_path | Path to CHANGELOG file within repository | `false` | CHANGELOG.md |

require-changelog-entry/action.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ inputs:
1111
default: ${{ github.event.repository.default_branch }}
1212
required: false
1313

14+
checkout_path:
15+
description: This action checks out the repository for the current SHA as well as from the default branch. This path indicates where to checkout the repositories as to not clash with any other work in the workflow.
16+
default: temp/require-changelog-entry
17+
required: false
18+
1419
tag_prefix:
1520
description: Optional prefix string to apply to tag search
1621
required: false
@@ -89,14 +94,14 @@ runs:
8994
uses: actions/checkout@v3
9095
with:
9196
token: ${{ inputs.token }}
92-
path: ${{ github.action_path }}/current
97+
path: ${{ inputs.checkout_path }}/current
9398

9499
- name: Checkout Repository at default branch
95100
uses: actions/checkout@v3
96101
with:
97102
token: ${{ inputs.token }}
98103
ref: ${{ inputs.default_branch }}
99-
path: ${{ github.action_path }}/default
104+
path: ${{ inputs.checkout_path }}/default
100105

101106
###### Retrieve latest and Unreleased entries from CHANGELOGs ######
102107

@@ -105,22 +110,22 @@ runs:
105110
uses: mindsers/changelog-reader-action@v2
106111
with:
107112
validation_level: none
108-
path: ${{ github.action_path }}/current/${{ inputs.changelog_path }}
113+
path: ${{ inputs.checkout_path }}/current/${{ inputs.changelog_path }}
109114

110115
- name: Get Current Unreleased Changelog Entry
111116
id: current_unreleased
112117
uses: mindsers/changelog-reader-action@v2
113118
with:
114119
validation_level: none
115-
path: ${{ github.action_path }}/current/${{ inputs.changelog_path }}
120+
path: ${{ inputs.checkout_path }}/current/${{ inputs.changelog_path }}
116121
version: Unreleased
117122

118123
- name: Get Default Unreleased Changelog Entry
119124
id: default_unreleased
120125
uses: mindsers/changelog-reader-action@v2
121126
with:
122127
validation_level: none
123-
path: ${{ github.action_path }}/default/${{ inputs.changelog_path }}
128+
path: ${{ inputs.checkout_path }}/default/${{ inputs.changelog_path }}
124129
version: Unreleased
125130

126131
###### Prepare Latest Tag ######

require-changelog-entry/docs/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515

1616
### Removed
1717

18+
## [v0.2.1]
19+
20+
### Fixed
21+
22+
- Invalid checkout process on `${{ github.action_path }}` path.
23+
1824
## [v0.2.0]
1925

2026
### Added

0 commit comments

Comments
 (0)