Skip to content

Commit

Permalink
Add heylogs badge workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
charphi committed Jun 11, 2024
1 parent da55598 commit 08645b2
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/heylogs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Heylogs

on: [ push ]

jobs:
badge-job:
if: startsWith(github.repository, 'nbbrd/') && startsWith(github.ref, 'refs/heads/develop')
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
cache: 'maven'

- name: Scan changelog
run: mvn -B -ntp -U com.github.nbbrd.heylogs:heylogs-maven-plugin::scan -Dheylogs.output.file=scan.json -Dheylogs.format.id=json

- name: Create badges endpoint json
run: |
mkdir heylogs
jq '{schemaVersion: 1, label: "unreleased changes", message: "#\(.[0].summary.unreleasedChanges)", color: "E05735", logoColor: "white", namedLogo: "keepachangelog"}' scan.json > heylogs/unreleased-changes.json
- name: Deploy badges endpoint json
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./heylogs
destination_dir: ./heylogs

0 comments on commit 08645b2

Please sign in to comment.