Skip to content

Commit 6b58727

Browse files
committed
Automatically build overcloud host images
Trigger building new overcloud host images when a change to pulp-repo-versions.yml is pushed to stackhpc/2025.1.
1 parent 41cf8e0 commit 6b58727

File tree

4 files changed

+49
-1
lines changed

4 files changed

+49
-1
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# This file is a list of path filters for the PR workflow in .github/workflows/stackhpc-pull-request.yml.
2+
pulp-repo-versions: &pulp-repo-versions
3+
- 'etc/kayobe/pulp-repo-versions.yml'
File renamed without changes.

.github/workflows/stackhpc-pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
id: changes
3535
with:
3636
# Filters are defined in this file.
37-
filters: .github/path-filters.yml
37+
filters: .github/stackhpc-pull-request-path-filters.yml
3838

3939
tox:
4040
runs-on: ubuntu-24.04
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
name: Trigger overcloud host image build
3+
on:
4+
push:
5+
branches:
6+
- automatically-build-overcloud-host-images
7+
# - stackhpc/2025.1
8+
9+
jobs:
10+
check-changes:
11+
runs-on: ubuntu-24.04
12+
name: Check changed files
13+
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
14+
outputs:
15+
pulp-repo-versions: ${{ steps.changes.outputs.pulp-repo-versions }}
16+
steps:
17+
- name: GitHub Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Check changed files
21+
uses: dorny/paths-filter@v3
22+
id: changes
23+
with:
24+
filters: .github/overcloud-host-image-build-path-filters.yml
25+
26+
trigger-overcloud-host-image-build:
27+
runs-on: ubuntu-24.04
28+
name: Trigger overcloud host image build
29+
needs:
30+
- check-changes
31+
if: ${{ needs.check-changes.outputs.pulp-repo-versions == 'true' }}
32+
steps:
33+
- name: Trigger overcloud host image build
34+
run: |
35+
gh workflow run \
36+
overcloud-host-image-build.yml \
37+
--repo stackhpc/stackhpc-kayobe-config \
38+
--ref $BRANCH_NAME
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
42+
43+
- name: Display link to overcloud host image build workflows
44+
run: |
45+
echo "::notice Overcloud host image build workflows: https://github.com/stackhpc/stackhpc-kayobe-config/actions/workflows/overcloud-host-image-build.yml"

0 commit comments

Comments
 (0)