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 12 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
3 changes: 2 additions & 1 deletion .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 All @@ -68,7 +69,7 @@ jobs:

- name: Create changelog
id: build-changelog
uses: bakdata/ci-templates/actions/changelog-generate@1.49.0
uses: bakdata/ci-templates/actions/changelog-generate@tiedemann/changelog-action-fix
DerTiedemann marked this conversation as resolved.
Show resolved Hide resolved
if: ${{ inputs.changelog }}
with:
github-token: ${{ secrets.github-token }}
Expand Down
12 changes: 11 additions & 1 deletion 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 @@ -26,9 +34,11 @@ runs:
using: "composite"
steps:
- name: Check out repository
uses: bakdata/ci-templates/actions/[email protected]
uses: bakdata/ci-templates/actions/checkout@tiedemann/changelog-action-fix
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: "Describes if the repository is using any LFS files"
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"` | Describes if the repository is using any LFS files |
| 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"` | Describes if the repository is using any LFS files |
| persist-credentials | string | false | `"true"` | Whether to configure the token or SSH key with the local git config |
Expand Down