name: Run Ansible Playbook on: push: branches: - main jobs: run-ansible: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v3 - name: Copy base64 encoded SSH key to file to a temp file and dont decode it run: | echo "${{ secrets.ANSIBLE2 }}" > /tmp/id_rsa.b64 - name: cat the base64 SSH key run: | cat /tmp/id_rsa.b64 - name: Decode SSH key and save to file run: | base64 -d /tmp/id_rsa.b64 > /tmp/id_rsa chmod 600 /tmp/id_rsa