Merge pull request #17 from ls1intum/dev #16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Sync CHANGELOG | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "iris-thaumantias/CHANGELOG.md" | |
| pull_request: | |
| branches: | |
| - main | |
| types: | |
| - closed | |
| paths: | |
| - "iris-thaumantias/CHANGELOG.md" | |
| workflow_dispatch: # Allows manual trigger from GitHub Actions tab | |
| jobs: | |
| sync-changelog: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| fetch-depth: 0 | |
| - name: Copy CHANGELOG to root | |
| run: | | |
| cp iris-thaumantias/CHANGELOG.md CHANGELOG.md | |
| - name: Check for changes | |
| id: check_changes | |
| run: | | |
| git add CHANGELOG.md | |
| git diff --cached --quiet CHANGELOG.md || echo "changed=true" >> $GITHUB_OUTPUT | |
| - name: Commit and push if changed | |
| if: steps.check_changes.outputs.changed == 'true' | |
| run: | | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git commit -m "chore: sync CHANGELOG.md to root [skip ci]" | |
| git push |