Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tiedemann/changelog action fix #222

Merged
merged 15 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/bump-version-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
with:
ref: ${{ github.event.repository.default_branch }}
persist-credentials: false # required for pushing to protected branch later
fetch-depth: 0 # required for changelog generation

- name: Bump version
id: bump-version
Expand Down
10 changes: 10 additions & 0 deletions actions/changelog-generate/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ inputs:
description: Path to the changelog file in the GitHub repository
required: false
default: "CHANGELOG.md"
checkout:
description: "Whether to checkout the repository or not."
required: false
default: "false"
clean:
description: "Clean the repository before running the action."
required: false
default: "false"

outputs:
merged-changelog:
Expand All @@ -27,8 +35,10 @@ runs:
steps:
- name: Check out repository
uses: bakdata/ci-templates/actions/[email protected]
if: ${{ inputs.checkout == 'true' }}
with:
fetch-depth: 0
clean: ${{ inputs.clean }}
- name: Get config path
id: get-config-path
run: |
Expand Down
5 changes: 5 additions & 0 deletions actions/checkout/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ inputs:
description: "Whether LFS files should be cached. Only has an effect if lfs=true."
required: false
default: "true"
clean:
description: "Clean the repository before running the action."
required: false
default: "true"
submodules:
description: "Whether to checkout submodules: `true` to checkout submodules or `recursive` to recursively checkout submodules."
required: false
Expand All @@ -46,6 +50,7 @@ runs:
persist-credentials: ${{ inputs.persist-credentials }}
submodules: ${{ inputs.submodules }}
fetch-depth: ${{ inputs.fetch-depth }}
clean: ${{ inputs.clean }}

- name: Create LFS file list
if: ${{ inputs.lfs == 'true'}}
Expand Down
2 changes: 2 additions & 0 deletions docs/actions/changelog-generate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ steps:
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
| -------------- | ------ | -------- | ---------------- | --------------------------------------------------- |
| changelog-file | string | false | `"CHANGELOG.md"` | Path to the changelog file in the GitHub repository |
| checkout | string | false | `"false"` | Whether to checkout the repository or not. |
| clean | string | false | `"false"` | Clean the repository before running the action. |
| github-token | string | true | | The GitHub token for committing the changes. |
| tag | string | true | | Version after bump |

Expand Down
1 change: 1 addition & 0 deletions docs/actions/checkout/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ steps:
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
| ------------------- | ------ | -------- | ---------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| cache | string | false | `"true"` | Whether LFS files should be cached. Only has an effect if lfs=true. |
| clean | string | false | `"true"` | Clean the repository before running the action. |
| fetch-depth | string | false | `"1"` | Number of commits to fetch. 0 indicates all history for all branches and tags |
| lfs | string | false | `"false"` | Whether LFS files of the repository should be checked out |
| persist-credentials | string | false | `"true"` | Whether to configure the token or SSH key with the local git config |
Expand Down