Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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/actions/update-version-and-charts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ runs:
id: make-commit
shell: bash
run: |
git pull
git add .
git config user.name "eclipse-tractusx-bot"
git config user.email "tractusx-bot@eclipse.org"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/publish-new-snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ jobs:

if [[ "${{ github.event.workflow_run.event }}" == "schedule" || "${{ inputs.dated_snapshot }}" == "true" ]]; then
echo "VERSION=$RELEASE_VERSION_MAJOR.$RELEASE_VERSION_MINOR.$RELEASE_VERSION_PATCH-$(date +"%Y%m%d")-SNAPSHOT" >> "$GITHUB_OUTPUT"
echo "STABLE=true" >> "$GITHUB_OUTPUT"
else
echo "VERSION=$RELEASE_VERSION_MAJOR.$RELEASE_VERSION_MINOR.$RELEASE_VERSION_PATCH-SNAPSHOT" >> "$GITHUB_OUTPUT"
fi
Expand Down Expand Up @@ -111,6 +112,7 @@ jobs:
secrets: inherit
with:
version: ${{ needs.determine-version.outputs.VERSION }}
stable: ${{ needs.determine-version.outputs.STABLE }}

publish-openapi-to-gh-pages:
name: "Publish OpenAPI UI spec GitHub Pages"
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/trigger-maven-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,20 @@ on:
version:
required: false
description: 'a semver string denoting the version. Append -SNAPSHOT for snapshots. If omitted, the version is taken from gradle.properties'
stable:
type: string
required: false
description: 'notEmpty if is a versioned snapshot'
workflow_call:
inputs:
version:
type: string
required: false
description: 'a semver string denoting the version. Append -SNAPSHOT for snapshots. If omitted, the version is taken from gradle.properties'
stable:
type: string
required: false
description: 'notEmpty if is a versioned snapshot'

jobs:
maven-release:
Expand Down Expand Up @@ -63,3 +71,34 @@ jobs:
gpg-passphrase: ${{ secrets.ORG_GPG_PASSPHRASE }}
username: ${{ secrets.CENTRAL_SONATYPE_TOKEN_USERNAME }}
password: ${{ secrets.CENTRAL_SONATYPE_TOKEN_PASSWORD }}

update-snapshot-badge:
name: 'Update Snapshot badge in README.md'
needs: maven-release
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Update README badge
run: |
VERSION="${{ inputs.version }}"
ESCAPED_VERSION="${VERSION//-/--}"
STABLE="${{ inputs.stable }}"
if [ -n "STABLE" ]; then
sed -i "s|^\[snapshot-shield\]:.*|[snapshot-shield]:https://img.shields.io/badge/latest--snapshot-$ESCAPED_VERSION-blue?style=for-the-badge|" 'README.md'
fi
- name: Commit changes
id: commit-update-snapshot-badge
shell: bash
run: |
git pull
git add .
if git diff --cached --quiet; then
echo "Not a versioned Snapshot"
else
git config user.name "eclipse-tractusx-bot"
git config user.email "tractusx-bot@eclipse.org"
git commit --message "Update snapshot badge"
git push origin HEAD
fi
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
[![Contributors][contributors-shield]][contributors-url]
[![Stargazers][stars-shield]][stars-url]
[![Apache 2.0 License][license-shield]][license-url]

[![Latest Release][release-shield]][release-url]
[![Latest Snapshot][snapshot-shield]]()

[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=eclipse-tractusx_tractusx-edc&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=eclipse-tractusx_tractusx-edc)

Expand Down Expand Up @@ -83,3 +85,5 @@ See [LICENSE](https://github.com/eclipse-tractusx/tractusx-edc/blob/main/LICENSE
[release-shield]: https://img.shields.io/github/v/release/eclipse-tractusx/tractusx-edc.svg?style=for-the-badge

[release-url]: https://github.com/eclipse-tractusx/tractusx-edc/releases

[snapshot-shield]:https://img.shields.io/badge/latest--snapshot-Error-red?style=for-the-badge
Loading