Skip to content

Commit b75dea8

Browse files
committed
WIP: Propose PR when overcloud host images are built
1 parent 432aa29 commit b75dea8

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed

.github/workflows/overcloud-host-image-build.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,22 @@ jobs:
391391
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
392392
if: always()
393393

394+
- name: Trigger update overcloud host image tags
395+
run: |
396+
gh workflow run \
397+
update-overcloud-host-image-tags.yml \
398+
--repo stackhpc/stackhpc-kayobe-config \
399+
--ref $BRANCH_NAME \
400+
-f rocky9_tag=${{ steps.host_image_tag.outputs.host_image_tag }} \
401+
-f ubuntu_noble_tag=${{ steps.host_image_tag.outputs.host_image_tag }}
402+
env:
403+
GITHUB_TOKEN: ${{ secrets.STACKHPC_RELEASE_TRAIN_TOKEN }}
404+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
405+
406+
- name: Display link to update overcloud host image tags workflows
407+
run: |
408+
echo "::notice Overcloud host image promote workflow: https://github.com/stackhpc/stackhpc-kayobe-config/actions/workflows/update-overcloud-host-image-tags.yml"
409+
394410
- name: Send message to Slack via Workflow Builder
395411
uses: slackapi/[email protected]
396412
with:
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Update overcloud host image tags
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
rocky9_tag:
7+
description: Overcloud host image tag for Rocky 9
8+
type: string
9+
required: true
10+
ubuntu_noble_tag:
11+
description: Overcloud host image tag for Ubuntu
12+
type: string
13+
required: true
14+
15+
jobs:
16+
propose_overcloud_host_image_tag_updates:
17+
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
18+
runs-on: ubuntu-22.04
19+
permissions:
20+
contents: write
21+
pull-requests: write
22+
name: Update overcloud host image tags
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
with:
27+
ref: stackhpc/2025.1
28+
path: ${{ github.workspace }}/src/kayobe-config
29+
30+
- name: Update dependency key
31+
run: |
32+
sed -i "s/$SEARCH/$PREFIX$TAG_OVERRIDE/g" $REQUIREMENTS
33+
env:
34+
PREFIX: ${{ matrix.prefix }}
35+
TAG: ${{ steps.latest_tag.outputs.latest_tag }}
36+
REQUIREMENTS: ${{ github.workspace }}/${{ matrix.path }}
37+
SEARCH: ${{ matrix.search_regex }}
38+
39+
- name: Propose changes via PR if required
40+
uses: peter-evans/create-pull-request@v7
41+
with:
42+
path: ${{ github.workspace }}/src/kayobe-config
43+
commit-message: >-
44+
Bump ${{ matrix.key }} to ${{ steps.latest_tag.outputs.latest_tag }}
45+
author: stackhpc-ci <[email protected]>
46+
branch: update-dependency/${{ matrix.key }}/${{ inputs.openstack_version }}
47+
delete-branch: true
48+
title: >-
49+
Bump ${{ matrix.key }} to ${{ steps.latest_tag.outputs.latest_tag }}
50+
body: >
51+
This PR was created automatically to update ${{ inputs.openstack_version }}
52+
${{ matrix.key }} to ${{ steps.latest_tag.outputs.latest_tag }}.
53+
54+
GitHub Release Changelog:
55+
https://github.com/stackhpc/${{ matrix.key }}/releases/tag/${{ steps.latest_tag.outputs.latest_tag }}
56+
labels: |
57+
automated
58+
${{ inputs.openstack_codename }}

0 commit comments

Comments
 (0)