From 6b0651f03305cd21ab5b97c3511aa465384a5dfd Mon Sep 17 00:00:00 2001 From: Adam Lehechka <42357034+alehechka@users.noreply.github.com> Date: Sun, 7 May 2023 13:56:17 -0500 Subject: [PATCH] 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 --- autoreleaser/README.md | 2 +- require-changelog-entry/README.md | 3 ++- require-changelog-entry/action.yaml | 15 ++++++++++----- require-changelog-entry/docs/CHANGELOG.md | 6 ++++++ 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/autoreleaser/README.md b/autoreleaser/README.md index 275ca07..1df6f2b 100644 --- a/autoreleaser/README.md +++ b/autoreleaser/README.md @@ -30,7 +30,7 @@ jobs: id: changelog uses: lockerstock/github-actions/autoreleaser@main with: - token: ${{ secret.GITHUB_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} changelog_path: CHANGELOG.md ``` diff --git a/require-changelog-entry/README.md b/require-changelog-entry/README.md index 3827907..a11cfb2 100644 --- a/require-changelog-entry/README.md +++ b/require-changelog-entry/README.md @@ -23,7 +23,7 @@ jobs: id: changelog uses: lockerstock/github-actions/require-changelog-entry@main with: - token: ${{ secret.GITHUB_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} changelog_path: CHANGELOG.md - name: 'Error if no Changelog entry' @@ -40,6 +40,7 @@ jobs: | - | - | - | - | | token | GITHUB_TOKEN to access the GitHub API if the repository is private | `true` | | | default_branch | Default branch to compare the "Unreleased" section of the CHANGELOG to. | `false` | ${{ github.event.repository.default_branch }} | +| 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 | | tag_prefix | Optional prefix string to apply to tag search | `false` | | | tag_suffix | Optional suffix string to apply to tag search | `false` | | | changelog_path | Path to CHANGELOG file within repository | `false` | CHANGELOG.md | diff --git a/require-changelog-entry/action.yaml b/require-changelog-entry/action.yaml index 742b479..da89fbe 100644 --- a/require-changelog-entry/action.yaml +++ b/require-changelog-entry/action.yaml @@ -11,6 +11,11 @@ inputs: default: ${{ github.event.repository.default_branch }} required: false + checkout_path: + 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. + default: temp/require-changelog-entry + required: false + tag_prefix: description: Optional prefix string to apply to tag search required: false @@ -89,14 +94,14 @@ runs: uses: actions/checkout@v3 with: token: ${{ inputs.token }} - path: ${{ github.action_path }}/current + path: ${{ inputs.checkout_path }}/current - name: Checkout Repository at default branch uses: actions/checkout@v3 with: token: ${{ inputs.token }} ref: ${{ inputs.default_branch }} - path: ${{ github.action_path }}/default + path: ${{ inputs.checkout_path }}/default ###### Retrieve latest and Unreleased entries from CHANGELOGs ###### @@ -105,14 +110,14 @@ runs: uses: mindsers/changelog-reader-action@v2 with: validation_level: none - path: ${{ github.action_path }}/current/${{ inputs.changelog_path }} + path: ${{ inputs.checkout_path }}/current/${{ inputs.changelog_path }} - name: Get Current Unreleased Changelog Entry id: current_unreleased uses: mindsers/changelog-reader-action@v2 with: validation_level: none - path: ${{ github.action_path }}/current/${{ inputs.changelog_path }} + path: ${{ inputs.checkout_path }}/current/${{ inputs.changelog_path }} version: Unreleased - name: Get Default Unreleased Changelog Entry @@ -120,7 +125,7 @@ runs: uses: mindsers/changelog-reader-action@v2 with: validation_level: none - path: ${{ github.action_path }}/default/${{ inputs.changelog_path }} + path: ${{ inputs.checkout_path }}/default/${{ inputs.changelog_path }} version: Unreleased ###### Prepare Latest Tag ###### diff --git a/require-changelog-entry/docs/CHANGELOG.md b/require-changelog-entry/docs/CHANGELOG.md index 2526787..ff9d3a4 100644 --- a/require-changelog-entry/docs/CHANGELOG.md +++ b/require-changelog-entry/docs/CHANGELOG.md @@ -15,6 +15,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed +## [v0.2.1] + +### Fixed + +- Invalid checkout process on `${{ github.action_path }}` path. + ## [v0.2.0] ### Added