Skip to content

Commit fb142a1

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 6f7ea1f commit fb142a1

File tree

4 files changed

+48
-1
lines changed

4 files changed

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