Skip to content

Commit

Permalink
Add credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
arkid15r committed Sep 17, 2024
1 parent 32e673b commit b82f981
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/ansible/staging/update-data.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: Run Nest Staging Data Update
hosts: nest_staging
tasks:
- name: Start services
- name: Update Nest data
shell:
cmd: 'make update-data'
10 changes: 10 additions & 0 deletions .github/workflows/update-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,21 @@ env:
jobs:
update-data:
name: Run data update
env:
ANSIBLE_HOST_KEY_CHECKING: False
STAGING_HOST_IP_ADDRESS: '${{ secrets.STAGING_HOST_IP_ADDRESS }}'
STAGING_SSH_PRIVATE_KEY_PATH: '~/.ssh/nest_staging_private_key'
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Prepare SSH key
run: |
mkdir -m 700 ~/.ssh
echo "${{ secrets.STAGING_SSH_PRIVATE_KEY }}" > ${{ env.STAGING_SSH_PRIVATE_KEY_PATH }}
chmod 400 ${{ env.STAGING_SSH_PRIVATE_KEY_PATH }}
- name: Run make update-data
working-directory: .github/ansible
run: ansible-playbook -i inventory.yaml staging/update-data.yaml

0 comments on commit b82f981

Please sign in to comment.