synapse-product/.github/workflows/dependabot_changelog.yml
David Robertson cc8a3582e0
Try again to automate dependabot changelogs (#14017)
* Try again to automate dependabot changelogs

* Changelog
2022-10-03 14:34:50 +01:00

30 lines
983 B
YAML

name: Write changelog for dependabot PR
on:
pull_request:
types:
- opened
permissions:
# Needed to be able to push the commit. See
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#enable-auto-merge-on-a-pull-request
# for a similar example
contents: write
jobs:
add-changelog:
runs-on: 'ubuntu-latest'
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Write, commit and push changelog
run: |
echo "${{ github.event.pull_request.title }}." > "changelog.d/${{ github.event.pull_request.number }}".misc
git add changelog.d
git config user.email "github-actions[bot]@users.noreply.github.com"
git config user.name "GitHub Actions"
git commit -m "Changelog"
git push
shell: bash