summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/dependabot_changelog.yml23
-rw-r--r--changelog.d/13998.misc1
2 files changed, 24 insertions, 0 deletions
diff --git a/.github/workflows/dependabot_changelog.yml b/.github/workflows/dependabot_changelog.yml
new file mode 100644
index 0000000000..9fef12a91c
--- /dev/null
+++ b/.github/workflows/dependabot_changelog.yml
@@ -0,0 +1,23 @@
+name: Write changelog for dependabot PR
+on:
+  pull_request:
+    types:
+      - opened
+
+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 }}".docker
+          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
diff --git a/changelog.d/13998.misc b/changelog.d/13998.misc
new file mode 100644
index 0000000000..7d793b56e0
--- /dev/null
+++ b/changelog.d/13998.misc
@@ -0,0 +1 @@
+Prototype a workflow to automatically add changelogs to dependabot PRs.