Skip to content

Commit e1f756a

Browse files
committed
Correct proposing PR automatically
1 parent 16d47df commit e1f756a

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
runs-on: ${{ needs.runner-selection.outputs.runner_name_image_build }}
4545
needs:
4646
- runner-selection
47-
permissions: {}
47+
permissions: write-all
4848
steps:
4949
- name: Validate inputs
5050
run: |
@@ -56,7 +56,7 @@ jobs:
5656
- name: Install Package
5757
uses: ConorMacBride/install-package@main
5858
with:
59-
apt: git unzip nodejs python3-pip python3-venv openssh-server openssh-client jq
59+
apt: git unzip nodejs python3-pip python3-venv openssh-server openssh-client jq gh
6060

6161
- name: Start the SSH service
6262
run: |
@@ -397,10 +397,10 @@ jobs:
397397
update-overcloud-host-image-tags.yml \
398398
--repo stackhpc/stackhpc-kayobe-config \
399399
--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 }}
400+
$(if [[ "${{ inputs.rocky9 }}" == "true" ]]; then echo "-f rocky9_tag=${{ steps.host_image_tag.outputs.host_image_tag }}"; fi) \
401+
$(if [[ "${{ inputs.ubuntu-noble }}" == "true" ]]; then echo "-f ubuntu_noble_tag=${{ steps.host_image_tag.outputs.host_image_tag }}"; fi)
402402
env:
403-
GITHUB_TOKEN: ${{ secrets.STACKHPC_RELEASE_TRAIN_TOKEN }}
403+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
404404
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
405405

406406
- name: Display link to update overcloud host image tags workflows

.github/workflows/update-overcloud-host-image-tags.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1+
---
12
name: Update overcloud host image tags
23

34
on:
4-
workflow_call:
5+
workflow_dispatch:
56
inputs:
67
rocky9_tag:
78
description: Overcloud host image tag for Rocky 9
89
type: string
9-
required: true
1010
ubuntu_noble_tag:
1111
description: Overcloud host image tag for Ubuntu
1212
type: string
13-
required: true
1413

1514
jobs:
1615
propose_overcloud_host_image_tag_updates:
@@ -27,10 +26,15 @@ jobs:
2726
ref: stackhpc/2025.1
2827
path: ${{ github.workspace }}/src/kayobe-config
2928

30-
- name: Update overcloud host image tags
29+
- name: Update Rocky 9 overcloud host image tag
3130
run: |
32-
sed -i "/stackhpc_rocky_9_overcloud_host_image_version/s/.*/stackhpc_rocky_9_overcloud_host_image_version: ${{ inputs.rocky9_tag }}/" etc/kayobe/pulp-host-image-versions.yml
33-
sed -i "/stackhpc_ubuntu_noble_overcloud_host_image_version/s/.*/stackhpc_ubuntu_noble_overcloud_host_image_version: ${{ inputs.ubuntu_noble_tag }}/" etc/kayobe/pulp-host-image-versions.yml
31+
sed -i "/stackhpc_rocky_9_overcloud_host_image_version/s/.*/stackhpc_rocky_9_overcloud_host_image_version: ${{ inputs.rocky9_tag }}/" ${{ github.workspace }}/src/kayobe-config/etc/kayobe/pulp-host-image-versions.yml
32+
if: "${{ inputs.rocky9_tag != '' }}"
33+
34+
- name: Update Ubuntu Noble overcloud host image tag
35+
run: |
36+
sed -i "/stackhpc_ubuntu_noble_overcloud_host_image_version/s/.*/stackhpc_ubuntu_noble_overcloud_host_image_version: ${{ inputs.ubuntu_noble_tag }}/" ${{ github.workspace }}/src/kayobe-config/etc/kayobe/pulp-host-image-versions.yml
37+
if: "${{ inputs.ubuntu_noble_tag != '' }}"
3438

3539
- name: Propose changes via PR if required
3640
uses: peter-evans/create-pull-request@v7
@@ -39,13 +43,13 @@ jobs:
3943
commit-message: >-
4044
Bump overcloud host image tags
4145
author: stackhpc-ci <[email protected]>
42-
branch: bump-overcloud-host-images/${{ inputs.rocky9_tag }}
46+
branch: bump-overcloud-host-images-${{ inputs.rocky9_tag }}-${{ inputs.ubuntu_noble_tag }}
4347
delete-branch: true
4448
title: >-
4549
DNM test PR: Bump overcloud host image tags
46-
body: >
50+
body: |
4751
This PR was created automatically to update the overcloud host image
48-
tags to:
52+
tags.
4953
Rocky 9: ${{ inputs.rocky9_tag }}
5054
Ubuntu Noble: ${{ inputs.ubuntu_noble_tag }}
5155
labels: |

0 commit comments

Comments
 (0)