Skip to content

Commit

Permalink
Merge pull request #1310 from stackhpc/container-image-build
Browse files Browse the repository at this point in the history
Validate inputs to github workflows
  • Loading branch information
Alex-Welsh authored Oct 10, 2024
2 parents 98a9d28 + abf4976 commit fb25947
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/overcloud-host-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ jobs:
runs-on: arc-skc-host-image-builder-runner
permissions: {}
steps:
- name: Validate inputs
run: |
if [[ ${{ inputs.rocky9 }} == 'false' && ${{ inputs.ubuntu-jammy }} == 'false' ]]; then
echo "At least one distribution must be selected"
exit 1
fi
- name: Install Package
uses: ConorMacBride/install-package@main
with:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/overcloud-host-image-promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ jobs:
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
runs-on: ubuntu-22.04
steps:
- name: Validate inputs
run: |
if [[ ${{ inputs.rocky9 }} == 'false' && ${{ inputs.ubuntu-jammy }} == 'false' ]]; then
echo "At least one distribution must be selected"
exit 1
fi
- uses: actions/checkout@v4
with:
path: src/kayobe-config
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/overcloud-host-image-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ jobs:
runs-on: arc-skc-host-image-builder-runner
permissions: {}
steps:
- name: Validate inputs
run: |
if [[ ${{ inputs.rocky9 }} == 'false' && ${{ inputs.ubuntu-jammy }} == 'false' ]]; then
echo "At least one distribution must be selected"
exit 1
fi
- name: Install package dependencies
run: |
sudo apt update
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/stackhpc-container-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ on:
required: false
default: ""
overcloud:
description: Build overcloud images?
description: Build container images for overcloud services?
type: boolean
required: false
default: true
seed:
description: Build seed images?
description: Build container images for seed services?
type: boolean
required: false
default: false
Expand Down Expand Up @@ -52,6 +52,17 @@ jobs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
openstack_release: ${{ steps.openstack_release.outputs.openstack_release }}
steps:
- name: Validate inputs
run: |
if [[ ${{ inputs.rocky-linux-9 }} == 'false' && ${{ inputs.ubuntu-jammy }} == 'false' ]]; then
echo "At least one distribution must be selected"
exit 1
fi
if [[ ${{ inputs.overcloud }} == 'false' && ${{ inputs.seed }} == 'false' ]]; then
echo "At least one of overcloud or seed must be selected"
exit 1
fi
- name: Checkout
uses: actions/checkout@v4

Expand Down

0 comments on commit fb25947

Please sign in to comment.