Skip to content

Commit 7581f26

Browse files
committed
choose cloud for fatimage workflow_dispatch
1 parent 27958e1 commit 7581f26

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

.github/workflows/fatimage.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
name: Build fat image
33
'on':
44
workflow_dispatch:
5+
inputs:
6+
ci_cloud:
7+
description: 'Select the CI_CLOUD'
8+
required: true
9+
type: choice
10+
options:
11+
- LEAFCLOUD
12+
- ARCUS
13+
- SMS
514
concurrency:
615
group: ${{ github.ref }}-{{ matrix.os_version }}-{{ matrix.build }} # to branch/PR + OS + build
716
cancel-in-progress: true
@@ -25,7 +34,7 @@ jobs:
2534
env:
2635
ANSIBLE_FORCE_COLOR: True
2736
OS_CLOUD: openstack
28-
CI_CLOUD: ${{ vars.CI_CLOUD }}
37+
CI_CLOUD: ${{ github.event.inputs.ci_cloud }}
2938
steps:
3039
- uses: actions/checkout@v2
3140

@@ -37,7 +46,7 @@ jobs:
3746
run: |
3847
set -x
3948
mkdir ~/.ssh
40-
echo "${{ secrets[format('{0}_SSH_KEY', vars.CI_CLOUD)] }}" > ~/.ssh/id_rsa
49+
echo "${{ secrets[format('{0}_SSH_KEY', env.CI_CLOUD)] }}" > ~/.ssh/id_rsa
4150
chmod 0600 ~/.ssh/id_rsa
4251
shell: bash
4352

@@ -51,7 +60,7 @@ jobs:
5160
- name: Write clouds.yaml
5261
run: |
5362
mkdir -p ~/.config/openstack/
54-
echo "${{ secrets[format('{0}_CLOUDS_YAML', vars.CI_CLOUD)] }}" > ~/.config/openstack/clouds.yaml
63+
echo "${{ secrets[format('{0}_CLOUDS_YAML', env.CI_CLOUD)] }}" > ~/.config/openstack/clouds.yaml
5564
shell: bash
5665

5766
- name: Setup environment
@@ -66,7 +75,7 @@ jobs:
6675
. environments/.stackhpc/activate
6776
cd packer/
6877
packer init .
69-
PACKER_LOG=1 packer build -on-error=${{ vars.PACKER_ON_ERROR }} -only=${{ matrix.build }} -var-file=$PKR_VAR_environment_root/${{ vars.CI_CLOUD }}.pkrvars.hcl openstack.pkr.hcl
78+
PACKER_LOG=1 packer build -on-error=${{ vars.PACKER_ON_ERROR }} -only=${{ matrix.build }} -var-file=$PKR_VAR_environment_root/${{ env.CI_CLOUD }}.pkrvars.hcl openstack.pkr.hcl
7079
env:
7180
PKR_VAR_os_version: ${{ matrix.os_version }}
7281

0 commit comments

Comments
 (0)