Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
98 changes: 49 additions & 49 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
name: Changelog

on:
pull_request:
push:
branches: [ "6" ]
tags: [ "*" ]

jobs:
changelog:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Generate changelog
uses: docker://toolhippie/calens:0.4.0
with:
entrypoint: /bin/sh
args: -c "calens > CHANGELOG.md"

- name: Show diff
run: git diff

- name: Output
run: cat CHANGELOG.md

- name: Publish
if: >
github.event_name == 'push' &&
github.ref == 'refs/heads/master' &&
!startsWith(github.ref, 'refs/tags/') &&
!startsWith(github.ref, 'refs/pull/')
run: |
git config user.name "ownClouders"
git config user.email "devops@owncloud.com"
git add CHANGELOG.md
if git diff --staged --quiet; then
echo "No changes to commit"
exit 0
fi
git commit -m "Automated changelog update [skip ci]"
git push origin master
#name: Changelog
#
#on:
# pull_request:
# push:
# branches: [ "6" ]
# tags: [ "*" ]
#
#jobs:
# changelog:
# runs-on: ubuntu-latest
# permissions:
# contents: write
# pull-requests: read
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#
# steps:
# - name: Checkout
# uses: actions/checkout@v4
#
# - name: Generate changelog
# uses: docker://toolhippie/calens:0.4.0
# with:
# entrypoint: /bin/sh
# args: -c "calens > CHANGELOG.md"
#
# - name: Show diff
# run: git diff
#
# - name: Output
# run: cat CHANGELOG.md
#
# - name: Publish
# if: >
# github.event_name == 'push' &&
# github.ref == 'refs/heads/master' &&
# !startsWith(github.ref, 'refs/tags/') &&
# !startsWith(github.ref, 'refs/pull/')
# run: |
# git config user.name "ownClouders"
# git config user.email "devops@owncloud.com"
# git add CHANGELOG.md
# if git diff --staged --quiet; then
# echo "No changes to commit"
# exit 0
# fi
# git commit -m "Automated changelog update [skip ci]"
# git push origin master
Loading
Loading