andrewmcodes/forem_lite

View on GitHub
.github/workflows/changelog.yml

Summary

Maintainability
Test Coverage
name: Changelog

on:
  push:
    branches:
      - main
jobs:
  changelog:
    name: Changelog Entry Action
    runs-on: ubuntu-latest
    timeout-minutes: 4
    if: "!contains(github.event.head_commit.message, '[nodoc]')"
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-ruby@v1
        with:
          ruby-version: "2.7"
      - name: Create local changes
        run: |
          gem install github_changelog_generator
          github_changelog_generator -u andrewmcodes -p bridgetown-inline-svg --token ${{ secrets.GITHUB_TOKEN }}
      - name: Commit files
        run: |
          git config --local user.email "andrewmcodes@protonmail.com"
          git config --local user.name "Andrew Mason"
          git add CHANGELOG.md
          git commit -m "docs: :pencil: Update changelog [ci skip]"
      - name: Push changes
        uses: ad-m/github-push-action@master
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          branch: main