Skip to content

Commit

Permalink
x20
Browse files Browse the repository at this point in the history
  • Loading branch information
ljocha committed Apr 8, 2024
1 parent 677cfe9 commit 17eceac
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/actions/deploy-common/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ inputs:
destination:
description: 'Ansible host'
required: true
SSH_PRIVATE_KEY:
required: true
SSH_KNOWN_HOSTS:
required: true
VAULT_PASSWORD:
required: true

runs:
using: 'composite'
Expand All @@ -15,8 +21,8 @@ runs:
shell: bash
run: |
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
echo "${{ secrets.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts
echo "::add-mask::${{ inputs.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
echo "${{ inputs.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts
ssh ${{ inputs.destination }} hostname -f
- name: Pick secret.yml
Expand All @@ -26,10 +32,8 @@ runs:
- name: Install requirements
shell: bash
run: ansible-galaxy install -p roles -r requirements.yml

- name: Vault password
shell: bash
run: echo "${{ secrets.VAULT_PASSWORD }}" >.vault-password.txt
- name: Vault password shell: bash
run: echo "::add-mask::${{ inputs.VAULT_PASSWORD }}" >.vault-password.txt

- name: Hosts file
shell: bash
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/deploy-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@ jobs:
uses: ./.github/actions/deploy-common
with:
destination: 'usegalaxy-test.cerit-sc.cz'
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_KNOWN_HOSTS: ${{ secrets.SSH_KNOWN_HOSTS }}
VAULT_PASSWORD: ${{ secrets.VAULT_PASSWORD }}


0 comments on commit 17eceac

Please sign in to comment.