Skip to content

Commit 88ade26

Browse files
Kolla dependency updates on non-default branches (#1552)
* Allow kolla tag updates on non-default branches * Fixup matrices * Reno * Include version in title
1 parent e90aace commit 88ade26

File tree

3 files changed

+38
-16
lines changed

3 files changed

+38
-16
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Update Kolla versions
2+
3+
on:
4+
# Allow manual executions
5+
workflow_dispatch:
6+
# Run nightly
7+
schedule:
8+
- cron: '0 0 * * *'
9+
10+
jobs:
11+
update-from-branch:
12+
name: Update dependencies
13+
strategy:
14+
matrix:
15+
include:
16+
- version: stackhpc/2023.1
17+
- version: stackhpc/2024.1
18+
uses: ./.github/workflows/update-dependencies.yml
19+
with:
20+
openstack_version: ${{ matrix.version }}
21+
permissions:
22+
contents: write
23+
pull-requests: write

.github/workflows/update-dependencies.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
name: Update dependencies
22

33
on:
4-
# Allow manual executions
5-
workflow_dispatch:
6-
# Run nightly
7-
schedule:
8-
- cron: '0 0 * * *'
4+
workflow_call:
5+
inputs:
6+
openstack_version:
7+
description: OpenStack version
8+
type: string
9+
required: true
910

1011
jobs:
1112
propose_github_release_updates:
@@ -38,20 +39,14 @@ jobs:
3839
- name: Checkout
3940
uses: actions/checkout@v4
4041
with:
42+
ref: ${{ inputs.openstack_version }}
4143
path: ${{ github.workspace }}/src/kayobe-config
4244

43-
- name: Determine OpenStack release
44-
id: openstack_release
45-
run: |
46-
BRANCH=$(awk -F'=' '/defaultbranch/ {print $2}' .gitreview)
47-
echo "openstack_release=${BRANCH}" | sed -E "s,(stable|unmaintained)/,," >> $GITHUB_OUTPUT
48-
working-directory: ${{ github.workspace }}/src/kayobe-config
49-
5045
- name: Checkout the dependency repo
5146
uses: actions/checkout@v4
5247
with:
5348
repository: ${{ matrix.repository }}
54-
ref: stackhpc/${{ steps.openstack_release.outputs.openstack_release }}
49+
ref: ${{ inputs.openstack_version }}
5550
fetch-tags: true
5651
path: ${{ github.workspace }}/src/${{ matrix.key }}
5752

@@ -78,10 +73,10 @@ jobs:
7873
path: ${{ github.workspace }}/src/kayobe-config
7974
commit-message: >-
8075
Bump ${{ matrix.key }} to ${{ steps.latest_tag.outputs.latest_tag }}
81-
branch: update-dependency/${{ matrix.key }}
76+
branch: update-dependency/${{ matrix.key }}/${{ inputs.openstack_version }}
8277
delete-branch: true
8378
title: >-
84-
Bump ${{ matrix.key }} to ${{ steps.latest_tag.outputs.latest_tag }}
79+
Bump ${{ inputs.openstack_version }} ${{ matrix.key }} to ${{ steps.latest_tag.outputs.latest_tag }}
8580
body: >
86-
This PR was created automatically to update
81+
This PR was created automatically to update ${{ inputs.openstack_version }}
8782
${{ matrix.key }} to ${{ steps.latest_tag.outputs.latest_tag }}.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
features:
3+
- |
4+
Allow Kolla dependency updates on non-default branches.

0 commit comments

Comments
 (0)