Skip to content

Commit

Permalink
Merge branch 'main' into fix/changelog-action
Browse files Browse the repository at this point in the history
  • Loading branch information
yannick-roeder committed Jan 16, 2025
2 parents 593f93a + 3373937 commit 951f90b
Show file tree
Hide file tree
Showing 13 changed files with 59 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[bumpversion]
current_version = 1.50.4
current_version = 1.53.0
9 changes: 7 additions & 2 deletions .github/workflows/bump-version-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ on:
required: false
default: true
type: boolean
changelog-file:
description: Path to the changelog file in the GitHub repository
required: false
default: "CHANGELOG.md"
type: string
changelog-config:
description: "Changelog config path."
required: false
Expand Down Expand Up @@ -69,12 +74,12 @@ jobs:

- name: Create changelog
id: build-changelog
uses: bakdata/ci-templates/actions/changelog-generate@1.50.0
uses: bakdata/ci-templates/actions/changelog-generate@1.52.1
if: ${{ inputs.changelog }}
with:
github-token: ${{ secrets.github-token }}
tag: ${{ steps.bump-version.outputs.release-version }}
changelog-file: CHANGELOG.md
changelog-file: ${{ inputs.changelog-file }}

- name: Commit and push changes including .bumpversion.cfg file
uses: bakdata/ci-templates/actions/[email protected]
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/docker-build-and-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,22 @@ jobs:
env:
DOCKER_METADATA_PR_HEAD_SHA: true # set correct sha for PRs

- name: Prepare build args
id: args
run: |
{
echo "build-args<<EOF"
echo "IMAGE_TAGS=${{ join(fromJSON(steps.meta.outputs.json).tags) }}"
echo "${{ inputs.docker-build-args }}"
echo "EOF"
} >> "$GITHUB_OUTPUT"
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ${{ inputs.docker-context }}
file: ${{ inputs.dockerfile-path }}
build-args: ${{ inputs.docker-build-args }}
build-args: ${{ steps.args.outputs.build-args }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/java-gradle-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
needs: test
steps:
- name: Assess code quality
uses: bakdata/ci-templates/actions/java-gradle-assess-code-quality@1.49.0
uses: bakdata/ci-templates/actions/java-gradle-assess-code-quality@1.52.0
with:
download-lfs-files: ${{ inputs.download-lfs-files }}
gradle-cache: ${{ inputs.gradle-cache }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/java-gradle-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ concurrency:
jobs:
build-and-test:
name: Build, Test and Assess code quality
uses: bakdata/ci-templates/.github/workflows/java-gradle-base.yaml@1.49.0
uses: bakdata/ci-templates/.github/workflows/java-gradle-base.yaml@1.52.0
with:
java-distribution: ${{ inputs.java-distribution }}
java-version: ${{ inputs.java-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/java-gradle-library.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ concurrency:
jobs:
build-and-test:
name: Build, Test and Assess code quality
uses: bakdata/ci-templates/.github/workflows/java-gradle-base.yaml@1.49.0
uses: bakdata/ci-templates/.github/workflows/java-gradle-base.yaml@1.52.0
with:
java-distribution: ${{ inputs.java-distribution }}
java-version: ${{ inputs.java-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/java-gradle-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ concurrency:
jobs:
build-and-test:
name: Build, Test and Assess code quality
uses: bakdata/ci-templates/.github/workflows/java-gradle-base.yaml@1.49.0
uses: bakdata/ci-templates/.github/workflows/java-gradle-base.yaml@1.52.0
with:
java-distribution: ${{ inputs.java-distribution }}
java-version: ${{ inputs.java-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-poetry-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:

- name: Create changelog
id: build-changelog
uses: bakdata/ci-templates/actions/changelog-generate@1.50.0
uses: bakdata/ci-templates/actions/changelog-generate@1.52.1
if: ${{ inputs.changelog }}
with:
github-token: ${{ secrets.github-token }}
Expand Down
2 changes: 1 addition & 1 deletion actions/changelog-generate/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ runs:
id: get-config-path
run: |
DEFAULT_PATH=$GITHUB_ACTION_PATH/default-cliff.toml
if [-f cliff.toml ]; then
if [ -f cliff.toml ]; then
cp cliff.toml tmp_cliff.toml
else
cp $DEFAULT_PATH tmp_cliff.toml
Expand Down
26 changes: 21 additions & 5 deletions actions/java-gradle-assess-code-quality/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,20 @@ inputs:
description: "Key ring (base64 encoded) for signing the Sonatype publication."
required: false
sonar-organization:
description: "Organization for Sonarcloud."
description: "Organization for Sonarqube."
required: false
sonar-token:
description: "Token for Sonarcloud."
description: "Token for Sonarqube."
required: false
sonar-host:
description: "Host for Sonarqube."
required: false
default: "https://sonarcloud.io"
sonar-project-key:
description: "Project key for Sonarqube."
required: false
sonar-project-name:
description: "Project name for Sonarqube."
required: false
working-directory:
description: "Working directory of your Gradle artifacts. (Default is .)"
Expand All @@ -52,7 +62,6 @@ inputs:

runs:
using: "composite"
if: "!contains(github.repository, 'playground')"
steps:
- name: Check out repository
uses: bakdata/ci-templates/actions/[email protected]
Expand All @@ -70,8 +79,15 @@ runs:

# sonar.branch.autoconfig.disabled is necessary for autocreation of projects on Sonarcloud to work
- name: Assess code quality
if: ${{ inputs.sonar-token != '' && inputs.sonar-organization != '' }}
run: ./gradlew -Dsonar.branch.autoconfig.disabled=true -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=${{ inputs.sonar-organization }} --info --stacktrace sonarqube ${{ inputs.gradle-refresh-dependencies == 'true' && '--refresh-dependencies' || '' }}
if: ${{ inputs.sonar-token != '' }}
run: |
./gradlew -Dsonar.branch.autoconfig.disabled=true \
-Dsonar.host.url=${{ inputs.sonar-host }} \
${{ (inputs.sonar-organization != '' && format('-Dsonar.organization={0}', inputs.sonar-organization)) || '' }} \
${{ (inputs.sonar-project-key != '' && format('-Dsonar.projectKey={0}', inputs.sonar-project-key)) || '' }} \
${{ (inputs.sonar-project-name != '' && format('-Dsonar.projectName={0}', inputs.sonar-project-name)) || '' }} \
--info --stacktrace sonarqube \
${{ inputs.gradle-refresh-dependencies == 'true' && '--refresh-dependencies' || '' }}
shell: bash
working-directory: ${{ inputs.working-directory }}
env:
Expand Down
2 changes: 1 addition & 1 deletion actions/python-poetry-bump-version/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ runs:
run: |
echo "old-version=$(poetry version -s)" >> $GITHUB_OUTPUT
if [[ "${{ inputs.release-type }}" == "snapshot" ]]; then
snapshot_time=$(python -c "from datetime import datetime; time = datetime.now(); print(time.strftime('%Y%m%d%H%M%S'))")
snapshot_time=$(date +'%Y%m%d%H%M%S')
poetry version patch
poetry version $(poetry version -s).dev$snapshot_time
else
Expand Down
7 changes: 5 additions & 2 deletions docs/actions/java-gradle-assess-code-quality/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ steps:
| signing-key-id | string | false | | Key id for signing the Sonatype publication. |
| signing-password | string | false | | Password for signing the Sonatype publication. |
| signing-secret-key-ring | string | false | | Key ring (base64 encoded) for signing the Sonatype publication. |
| sonar-organization | string | false | | Organization for Sonarcloud. |
| sonar-token | string | false | | Token for Sonarcloud. |
| sonar-host | string | false | `"https://sonarcloud.io"` | Host for Sonarqube. |
| sonar-organization | string | false | | Organization for Sonarqube. |
| sonar-project-key | string | false | | Project key for Sonarqube. |
| sonar-project-name | string | false | | Project name for Sonarqube. |
| sonar-token | string | false | | Token for Sonarqube. |
| working-directory | string | false | `"."` | Working directory of your Gradle artifacts. (Default is .) |
<!-- AUTO-DOC-INPUT:END -->
Expand Down
13 changes: 7 additions & 6 deletions docs/workflows/bump-version-release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,13 @@ jobs:
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
| 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 .) |
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
| ----------------- | ------- | -------- | ---------------- | --------------------------------------------------------------- |
| changelog | boolean | false | `true` | Create changelog for release. |
| changelog-config | string | false | | Changelog config path. |
| changelog-file | string | false | `"CHANGELOG.md"` | Path to the changelog file in the GitHub repository |
| release-type | string | true | | Scope of the release (major, minor or patch). |
| working-directory | string | false | `"."` | Working directory containing `.bumpversion.cfg`. (Default is .) |

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

Expand Down

0 comments on commit 951f90b

Please sign in to comment.