-
Notifications
You must be signed in to change notification settings - Fork 5
72 lines (65 loc) · 2.35 KB
/
create_changelog.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
name: create changelog
on:
workflow_call:
inputs:
collection_namespace:
description: "Install collection python dependencies"
required: true
type: string
collection_name:
description: "Path to the collection source"
required: true
type: string
collection_version:
description: The final collection path
required: false
type: string
collection_repo:
description: The collection url
required: false
type: string
secrets:
token:
description: token for uploading tarballs to a release
required: true
jobs:
changelog:
runs-on: ubuntu-latest
env:
ANSIBLE_FORCE_COLOR: 1
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Ansible
run: pip install --upgrade ansible-core antsibull-changelog
- name: template galaxy file (appended version with -devel as this will remain in repo)
run: ansible all -i 'localhost,' -c local -m template -a "src=.github/files/galaxy.yml.j2 dest=galaxy.yml" --extra-vars "collection_namespace=${{ inputs.collection_namespace }} collection_name=${{ inputs.collection_name }} collection_version=${{ inputs.collection_version }}-devel collection_repo=${{ inputs.collection_repo }}"
shell: bash
- name: Run changelog
run: antsibull-changelog release --verbose --version ${{ inputs.collection_version }}
- name: Create Pull Request
id: prcreate
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.token }}
commit-message: Update changelog ${{ github.ref }}
committer: GitHub <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
base: devel
branch: changelog-patches
delete-branch: true
title: '[RELEASE] Update changelog ${{ github.ref }}'
body: |
Update changelog
- Updated with changelog for release ${{ github.ref }}
- Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
labels: |
changelog
automated pr
draft: false
...