Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 3fc6d36
Author: Jan Max Tiedemann <[email protected]>
Date:   Wed Nov 13 14:46:55 2024 +0100

    found it :3

commit 3a15742
Merge: 6c611e9 cb23302
Author: Jan Max Tiedemann <[email protected]>
Date:   Wed Nov 13 14:38:29 2024 +0100

    Merge branch 'main' into tiedemann/changelog-action-dont-clean

commit 6c611e9
Author: Jan Max Tiedemann <[email protected]>
Date:   Wed Nov 13 14:29:31 2024 +0100

    fix symlinks

commit 9bdd055
Author: Jan Max Tiedemann <[email protected]>
Date:   Wed Nov 13 14:28:28 2024 +0100

    rm symlinks

commit 1ef4c02
Author: Jan Max Tiedemann <[email protected]>
Date:   Wed Nov 13 14:27:05 2024 +0100

    remove symlinks

commit 933cb88
Author: Yannick Röder <[email protected]>
Date:   Wed Nov 13 14:04:24 2024 +0100

    Move checkout condition to changelog action

commit 1efda99
Author: Jan Max Tiedemann <[email protected]>
Date:   Wed Nov 13 11:49:20 2024 +0100

    feat: add input to skip checkout based on input flag

commit f82dac8
Author: Jan Max Tiedemann <[email protected]>
Date:   Tue Nov 12 17:06:26 2024 +0100

    fix: use proper branch

commit 9c0658e
Author: Jan Max Tiedemann <[email protected]>
Date:   Tue Nov 12 16:56:51 2024 +0100

    fix: add the input to the changelog action aswell

commit 178c7e2
Author: Jan Max Tiedemann <[email protected]>
Date:   Tue Nov 12 16:55:28 2024 +0100

    fix: make the clean step optional

commit 0207242
Author: Jan Max Tiedemann <[email protected]>
Date:   Tue Nov 12 16:42:41 2024 +0100

    fix: fixes deletion of uncommited files in the current working directory

commit e163e0b
Author: bakdata-bot <[email protected]>
Date:   Mon Nov 11 16:30:31 2024 +0000

    Bump version 1.48.0 → 1.49.0

commit 15ad433
Author: Yannick Röder <[email protected]>
Date:   Mon Nov 11 17:29:57 2024 +0100

    Revert pre-version bump in release workflow (#217)

commit f9ff265
Author: Yannick Röder <[email protected]>
Date:   Mon Nov 11 15:53:04 2024 +0100

    Update deprecated NodeJS actions (#215)

commit 9ac2b9f
Author: Yannick Röder <[email protected]>
Date:   Mon Nov 11 12:46:53 2024 +0100

    Update Python versions of Poetry setup test (#216)

commit 6318b88
Author: bakdata-bot <[email protected]>
Date:   Mon Nov 11 09:09:46 2024 +0000

    Bump version 1.47.0 → 1.48.0

commit 07b3b82
Author: DerTiedemann <[email protected]>
Date:   Mon Nov 11 10:08:45 2024 +0100

    feat: initial version of gsm secret loader (#213)

    This PR is the basis for the workload identity integration for GH
    workflows.
    Based on context it will load all secrets that are specified, transform
    their names to screaming snake case and export them.

    There are some tests and one is failing and i dont know why. All basic
    usecases work though.

    ---------

    Co-authored-by: Yannick Röder <[email protected]>

commit 5d0791b
Author: DerTiedemann <[email protected]>
Date:   Thu Nov 7 10:07:31 2024 +0100

    Adapt poetry release workflow for new changelog action (#214)

commit 994a5e8
Author: DerTiedemann <[email protected]>
Date:   Tue Nov 5 09:18:06 2024 +0100

    Feat: New changelog generator (#205)

    New changelog generator: https://git-cliff.org/
    This action updated replaces the previous generator with the
    aforementioned tool.

    All existing functionality has been preserved and some new things have
    been added, most notably the first contribution mention. The action will
    check of there is a `cliff.toml` present in the current repo and if not
    use the default that is present inside of this repo. Custom configs are
    sometimes required to filter out commits that dont contain meaningful
    changes like version bumps. An example of how this could look for
    streams-bootstrap:
    ```toml
    commit_parsers = [
      { message = "^\\[Gradle Release Plugin\\]", skip = true },
      { message = "^Changelog for version .*", skip = true },
    ]
    ```

    Which turns changelogs that look like this:
    2024-06-12

    * [Gradle Release Plugin] - new version commit: '2.22.2-SNAPSHOT'. by
    @bakdata-bot

    * Changelog for version 2.22.1 by @bakdata-bot

    * Add dynamic application.server config to streams app chart by
    @philipp94831 in
    [#214](bakdata/streams-bootstrap#214)

    * [Gradle Release Plugin] - pre tag commit:  '2.23.0'. by @bakdata-bot

    **Full Changelog**:
    bakdata/streams-bootstrap@2.22.1...2.23.0

    into this:
    2024-06-12

    * Add dynamic application.server config to streams app chart by
    @philipp94831 in
    [#214](bakdata/streams-bootstrap#214)

    **Full Changelog**:
    bakdata/streams-bootstrap@2.22.1...2.23.0

    <hr>

    For more config options have a look at the docs, this thing is pretty
    powerful. Let me know what you think.

commit b7da258
Author: bakdata-bot <[email protected]>
Date:   Mon Sep 2 07:56:56 2024 +0000

    Bump version 1.46.10 → 1.47.0

commit e4ec4a2
Author: bakdata-bot <[email protected]>
Date:   Mon Sep 2 07:54:20 2024 +0000

    Bump version 1.46.9 → 1.46.10

commit cbee7aa
Author: yordanovsstoyan <[email protected]>
Date:   Mon Sep 2 10:53:44 2024 +0300

    Add Additional Flags input for action-lint action (#211)

commit 7b274ea
Author: bakdata-bot <[email protected]>
Date:   Mon Aug 26 07:57:45 2024 +0000

    Bump version 1.46.8 → 1.46.9

commit 270ac8a
Author: yordanovsstoyan <[email protected]>
Date:   Mon Aug 26 10:57:18 2024 +0300

    Output Image Tag in java-gradle-build-jib Action (#210)

commit 651ae5d
Author: bakdata-bot <[email protected]>
Date:   Mon Aug 19 07:54:43 2024 +0000

    Bump version 1.46.7 → 1.46.8

commit 2320bce
Author: Philipp Schirmer <[email protected]>
Date:   Mon Aug 19 09:54:17 2024 +0200

    Fix maven setup action (#209)

commit f001d66
Author: DerTiedemann <[email protected]>
Date:   Thu Aug 15 10:15:12 2024 +0200

    tiedemann/bump java build actions (#202)

    I just bumped these to the latest vesion as i though this would fix my
    issue, i think it can go upsteam anyway.

commit 9c0667c
Author: bakdata-bot <[email protected]>
Date:   Thu Aug 15 07:50:38 2024 +0000

    Bump version 1.46.6 → 1.46.7

commit 2d1eacc
Author: yordanovsstoyan <[email protected]>
Date:   Thu Aug 15 10:50:10 2024 +0300

    Fix tagging java-gradle-build-jib action (#208)

    Co-authored-by: Yannick Röder <[email protected]>

commit 892c704
Author: Jan Max Tiedemann <[email protected]>
Date:   Tue Sep 3 22:38:06 2024 +0200

    fix: make commit message correct

commit c3668a6
Author: Jan Max Tiedemann <[email protected]>
Date:   Tue Sep 3 22:25:11 2024 +0200

    fix: persist credentials

commit 1800eff
Author: Jan Max Tiedemann <[email protected]>
Date:   Tue Sep 3 22:19:28 2024 +0200

    fix: try using normal git commits

commit cb5bc5b
Author: Jan Max Tiedemann <[email protected]>
Date:   Tue Sep 3 20:46:10 2024 +0200

    fix: try to use checkout to pull the latest changes

commit 5926df2
Author: Jan Max Tiedemann <[email protected]>
Date:   Tue Sep 3 20:39:29 2024 +0200

    fix: add git config

commit e70c241
Author: Jan Max Tiedemann <[email protected]>
Date:   Tue Sep 3 20:36:45 2024 +0200

    fix: add pull command

commit 78af696
Author: Jan Max Tiedemann <[email protected]>
Date:   Tue Sep 3 10:19:44 2024 +0200

    fix: try with push

commit 9365e3d
Author: Jan Max Tiedemann <[email protected]>
Date:   Tue Sep 3 10:13:26 2024 +0200

    fix: add git username + email

commit f1ec7de
Author: Jan Max Tiedemann <[email protected]>
Date:   Tue Sep 3 10:10:16 2024 +0200

    fix: try single push

commit e091bd6
Author: Jan Max Tiedemann <[email protected]>
Date:   Tue Sep 3 10:06:47 2024 +0200

    test

commit e170273
Author: Jan Max Tiedemann <[email protected]>
Date:   Tue Sep 3 10:01:55 2024 +0200

    fix: use different commit message for second commit

commit 7df58c7
Author: Jan Max Tiedemann <[email protected]>
Date:   Tue Sep 3 09:49:12 2024 +0200

    fix: new chamgelog action

commit 332f3eb
Author: Jan Max Tiedemann <[email protected]>
Date:   Tue Sep 3 07:30:54 2024 +0200

    fix: proper outpuit

commit e58ea38
Author: Jan Max Tiedemann <[email protected]>
Date:   Tue Sep 3 07:29:35 2024 +0200

    fix: only use bump

commit f1bc6f0
Author: Jan Max Tiedemann <[email protected]>
Date:   Tue Sep 3 07:28:20 2024 +0200

    fix: remove deprecated flags

commit e592eec
Author: Jan Max Tiedemann <[email protected]>
Date:   Tue Sep 3 07:27:10 2024 +0200

    fix: make sure there is an empty string for the comparison

commit eda6cff
Author: Jan Max Tiedemann <[email protected]>
Date:   Mon Sep 2 08:30:22 2024 +0200

    Revert "chore: prep new version for release"

    This reverts commit c12b090.

commit c12b090
Author: Jan Max Tiedemann <[email protected]>
Date:   Mon Sep 2 08:29:27 2024 +0200

    chore: prep new version for release

commit fbfe193
Author: Jan Max Tiedemann <[email protected]>
Date:   Thu Aug 8 07:06:32 2024 +0200

    fix: add missing inline bash operator

commit 43f8923
Author: Jan Max Tiedemann <[email protected]>
Date:   Tue Aug 6 03:04:25 2024 +0200

    lint: fix actionlint complaints

commit 5eea497
Author: Jan Max Tiedemann <[email protected]>
Date:   Tue Aug 6 03:01:32 2024 +0200

    fix:
    - use bump-my-version instead of deprecated bump2version
    - merge snapshot action into bump action via parameter
    - WARN: requires special config - example given

commit a2a3e0c
Author: Jan Max Tiedemann <[email protected]>
Date:   Tue Aug 6 02:59:01 2024 +0200

    fix: remove redundant action

commit 2c7f4c0
Author: yordanovsstoyan <[email protected]>
Date:   Thu Nov 9 12:59:54 2023 +0200

    changes

commit 7a76951
Author: yordanovsstoyan <[email protected]>
Date:   Wed Oct 4 10:41:43 2023 +0300

    remove-variable

commit 0b030f3
Author: yordanovsstoyan <[email protected]>
Date:   Wed Oct 4 10:39:41 2023 +0300

    test

commit d0d3c60
Author: yordanovsstoyan <[email protected]>
Date:   Tue Oct 3 13:08:49 2023 +0300

    test

commit 54c86f7
Author: yordanovsstoyan <[email protected]>
Date:   Tue Oct 3 13:00:37 2023 +0300

    test

commit 78b45d4
Author: yordanovsstoyan <[email protected]>
Date:   Tue Oct 3 12:58:45 2023 +0300

    reboot

commit 99c4971
Author: stoyan.yordanov <[email protected]>
Date:   Thu Aug 31 09:23:26 2023 +0300

    commit-message

commit 82db094
Author: stoyan.yordanov <[email protected]>
Date:   Tue Aug 29 15:25:51 2023 +0300

    commit-message

commit a0416c6
Author: stoyan.yordanov <[email protected]>
Date:   Tue Aug 29 13:24:15 2023 +0300

    commit-message

commit 0375c17
Author: stoyan.yordanov <[email protected]>
Date:   Tue Aug 29 12:39:27 2023 +0300

    commit-message
  • Loading branch information
DerTiedemann committed Nov 19, 2024
1 parent 0075395 commit d1f9a06
Show file tree
Hide file tree
Showing 9 changed files with 90 additions and 27 deletions.
41 changes: 32 additions & 9 deletions .github/workflows/bump-version-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ on:
required: false
default: true
type: boolean
changelog-config:
description: "Changelog config path."
required: false
default: ""
type: string
working-directory:
description: "Working directory containing `.bumpversion.cfg`. (Default is .)"
required: false
Expand Down Expand Up @@ -57,15 +52,28 @@ jobs:
uses: bakdata/ci-templates/actions/[email protected]
with:
ref: ${{ github.event.repository.default_branch }}
persist-credentials: false # required for pushing to protected branch later
persist-credentials: true # required for pushing to protected branch later

- name: Setup Git
run: |
git config --global user.name "${{ secrets.github-username }}"
git config --global user.email "${{ secrets.github-email }}"
- name: Bump version
- name: Remove snapshot suffix
id: bump-version
uses: bakdata/ci-templates/actions/bump-version@v1.21.2
uses: bakdata/ci-templates/actions/bump-version@feat/new-bumpversion
with:
release-type: ${{ inputs.release-type }}
release-type: "release"
working-directory: ${{ inputs.working-directory }}

- name: Commit .bumpversion.cfg file without snapshot
run: |
git add .bumpversion.cfg
git commit -m "Bump version ${{ steps.bump-version.outputs.old-version }} → ${{ steps.bump-version.outputs.release-version }}"
git fetch origin
git rebase --strategy-option=theirs origin/main
git push --verbose
- name: Create changelog
id: build-changelog
uses: bakdata/ci-templates/actions/[email protected]
Expand Down Expand Up @@ -93,3 +101,18 @@ jobs:
github-token: ${{ secrets.github-token }}
release-title: "${{ steps.bump-version.outputs.release-version }}"
release-body: "${{ steps.build-changelog.outputs.single-changelog }}"

- name: Bump to next snapshot version
id: bump-version-snapshot
uses: bakdata/ci-templates/actions/bump-version@feat/new-bumpversion
with:
release-type: ${{ inputs.release-type }}
working-directory: ${{ inputs.working-directory }}

- name: Commit .bumpversion.cfg file new version and snapshot
run: |
git add .bumpversion.cfg
git commit -m "Bump version ${{ steps.bump-version.outputs.release-version }} → ${{ steps.bump-version-snapshot.outputs.release-version }}"
git fetch origin
git rebase --strategy-option=theirs origin/main
git push --verbose
43 changes: 33 additions & 10 deletions actions/bump-version/action.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
name: "Bump version"
description: "Bump version with python bump2version using .bumpversion.cfg"
description: "Bump version with python bump-my-version using .bumpversion.cfg"
# config example .bumpversion.cfg:
# [bumpversion]
# current_version = 1.0.0
# search = version: {current_version}
# replace = version: {new_version}
# parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-(?P<release>snapshot))?
# serialize =
# {major}.{minor}.{patch}-{release}
# {major}.{minor}.{patch}

# [bumpversion:part:release]
# first_value = snapshot
# optional_value = release
# values =
# snapshot
# release

inputs:
release-type:
description: "The type of the release (major, minor or patch)."
description: "The type of the release (release, major, minor or patch). Release is a special case, where the snapshot suffix is removed."
required: true
working-directory:
description: "The directory containing the `.bumpversion.cfg` file."
Expand All @@ -25,20 +41,27 @@ outputs:
runs:
using: "composite"
steps:
- name: Set up bump2version
- name: Set up bump-my-version
run: |
pipx install bump2version
pipx install bump-my-version
shell: bash

- name: Bump version
id: bump-version
run: |
parameters=(--no-commit --no-tag ${{ inputs.release-type }})
echo "old-version=$(python -c "from configparser import ConfigParser; cfg = ConfigParser(); cfg.read('.bumpversion.cfg'); print(cfg['bumpversion']['current_version'])")" >> "$GITHUB_OUTPUT"
if [ -n "${{ inputs.new-version }}" ]; then
parameters+=(--new-version ${{ inputs.new-version }})
echo "old-version=$(bump-my-version show current_version | tail -1)" >> "$GITHUB_OUTPUT"
if [[ "${{ inputs.new-version }}" != "" ]]; then
bump-my-version --new-version ${{ inputs.new-version }}
else
bump-my-version bump ${{ inputs.release-type }}
fi
bump2version "${parameters[@]}"
echo "new-version=$(python -c "from configparser import ConfigParser; cfg = ConfigParser(); cfg.read('.bumpversion.cfg'); print(cfg['bumpversion']['current_version'])")" >> "$GITHUB_OUTPUT"
echo "new-version=$(bump-my-version show current_version | tail -1)" >> "$GITHUB_OUTPUT"
# release: a.b.c-snapshot -> a.b.c
# release a.b.c -> crash
# major: a.b.c(-snapshot)? -> a+1.0.0-snapshot
# minor: a.b.c(-snapshot)? -> a.b+1.0-snapshot
# patch: a.b.c(-snapshot)? -> a.b.c+1-snapshot
# TLDR: release removes the snapshot suffix
shell: bash
working-directory: ${{ inputs.working-directory }}
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]
if: ${{ inputs.checkout }}
uses: bakdata/ci-templates/actions/checkout@tiedemann/changelog-action-dont-clean
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 @@ -29,6 +29,10 @@ inputs:
description: "Whether to checkout submodules: `true` to checkout submodules or `recursive` to recursively checkout submodules."
required: false
default: "false"
clean:
description: "Clean the repository before running the action."
required: false
default: "true"

outputs:
lfs-cache-hit:
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: 1 addition & 1 deletion actions/gcp-gsm-load-secrets/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ runs:
workload_identity_provider: ${{ inputs.workload-identity-provider }}
service_account: ${{ inputs.gke-service-account }}
- id: "parse_secrets"
uses: "bakdata/ci-templates/actions/parse-secrets[email protected]"
uses: "bakdata/ci-templates/actions/gcp-gsm-parse-secrets@tiedemann/changelog-action-dont-clean"
with:
project_name: ${{ inputs.gke-project-name }}
secrets_list: ${{ inputs.secrets-to-inject }}
Expand Down
10 changes: 5 additions & 5 deletions docs/actions/bump-version/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ steps:
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
| ----------------- | ------ | -------- | ------- | ----------------------------------------------------- |
| new-version | string | false | | |
| release-type | string | true | | The type of the release (major, minor or patch). |
| working-directory | string | false | `"."` | The directory containing the `.bumpversion.cfg` file. |
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
| ----------------- | ------ | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------- |
| new-version | string | false | | |
| release-type | string | true | | The type of the release (release, major, minor or patch). Release is a special case, where the snapshot suffix is removed. |
| working-directory | string | false | `"."` | The directory containing the `.bumpversion.cfg` file. |

<!-- AUTO-DOC-INPUT:END -->

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
1 change: 0 additions & 1 deletion docs/workflows/bump-version-release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ jobs:
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
| ----------------- | ------- | -------- | ------- | --------------------------------------------------------------- |
| changelog | boolean | false | `true` | Create changelog for release. |
| changelog-config | string | false | | Changelog config path. |
| release-type | string | true | | Scope of the release (major, minor or patch). |
| working-directory | string | false | `"."` | Working directory containing `.bumpversion.cfg`. (Default is .) |

Expand Down

0 comments on commit d1f9a06

Please sign in to comment.