-
Notifications
You must be signed in to change notification settings - Fork 23
56 lines (48 loc) · 1.72 KB
/
version-maintenance.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
---
name: Version Number Automation
on:
push:
branches:
- main
workflow_dispatch:
jobs:
version-maintenance:
name: Update collection version according to PR labels
runs-on: ubuntu-22.04
if: github.ref == 'refs/heads/main'
steps:
- name: Check out codebase
uses: actions/checkout@v4
- uses: release-drafter/release-drafter@v5
id: drafter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check out codebase
uses: actions/checkout@v4
- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: "3"
- name: Set up pip and install requirements
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Run updater script
run: scripts/update-version "${{ steps.drafter.outputs.name }}"
- name: Open PR for collection version update
uses: peter-evans/create-pull-request@v5
with:
base: main
add-paths: |
galaxy.yml
plugins/module_utils/constants.py
title: Update collection version to ${{ steps.drafter.outputs.name }}
body: |
One or more changes have been merged into main since the last release.
This PR updates the galaxy.yml (and eventual other files) version to keep up with these changes.
Merge this PR before publishing a new release.
This PR was created automatically by the version-maintenance workflow.
commit-message: "Update collection version to ${{ steps.drafter.outputs.name }}"
branch: maintenance/version-bump
labels: chore
delete-branch: true