Skip to content

Commit 2e80689

Browse files
committed
fix secrets usage
1 parent fefd4bb commit 2e80689

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

.github/workflows/stackhpc.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,10 @@ jobs:
2222
run: |
2323
set -x
2424
mkdir ~/.ssh
25-
echo "${BASTION_SSH_KEY}" > ~/.ssh/id_rsa
25+
echo "${{ secrets[format('{0}_SSH_KEY', vars.CI_CLOUD)] }}" > ~/.ssh/id_rsa
2626
chmod 0600 ~/.ssh/id_rsa
27-
env:
28-
ARCUS_SSH_KEY: ${{ secrets.ARCUS_SSH_KEY }}
29-
SMS_SSH_KEY: ${{ secrets.SMS_SSH_KEY }}
30-
BASTION_SSH_KEY: ${{ vars.CI_CLOUD }}_SSH_KEY
31-
27+
shell: bash
28+
3229
- name: Add bastion's ssh key to known_hosts
3330
run: cat environments/.stackhpc/bastion_fingerprints >> ~/.ssh/known_hosts
3431
shell: bash
@@ -46,13 +43,9 @@ jobs:
4643
- name: Write clouds.yaml
4744
run: |
4845
mkdir -p ~/.config/openstack/
49-
echo "${CLOUDS_YAML}" > ~/.config/openstack/clouds.yaml
46+
echo "${{ secrets[format('{0}_CLOUDS_YAML', vars.CI_CLOUD)] }}" > ~/.config/openstack/clouds.yaml
5047
shell: bash
51-
env:
52-
ARCUS_CLOUDS_YAML: ${{ secrets.ARCUS_CLOUDS_YAML }}
53-
SMS_CLOUDS_YAML: ${{ secrets.SMS_CLOUDS_YAML }}
54-
CLOUDS_YAML: ${{ vars.CI_CLOUD }}_CLOUDS_YAML }}
55-
48+
5649
- name: Setup environment-specific inventory/terraform inputs
5750
run: |
5851
. venv/bin/activate

0 commit comments

Comments
 (0)