1
0
Fork 0
mirror of https://github.com/dawidd6/action-ansible-playbook.git synced 2024-11-23 00:49:42 +00:00
action-ansible-playbook/.github/workflows/test.yml

32 lines
1.3 KiB
YAML
Raw Normal View History

2020-03-21 16:06:40 +00:00
name: Test Action
on: push
jobs:
test:
runs-on: ubuntu-latest
2020-03-21 19:35:01 +00:00
container:
image: alpine
services:
2020-03-21 19:35:01 +00:00
alpine:
image: dawidd6/alpine-for-ansible
env:
SSH_PUBLIC_KEY: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCz6k3s62Sc3NsOXwx+3YlMKlSOC4sdnzbkKkS3RueS3gngbnCr6bLnVuVQcH2WHQ+5oPlAWRU3KQQsEjxYz/4pA7iJ8PiUlnMeHWwVItgPjfo/o80N3qnyrEu7L2JpcuDVBoeb8P2HxCu87pNaQOaEbao13uuB5+UAQVPTSEU4+QpD48TKlbv38CGl+UzKxzUYOPYCovg0iIXYgf+qO6qTyvMkRpgNFU142Ly1TZJjVtdNH2cLxKtBkPSB8s11QG1UgzkgnOPgAP9kE2iE62Kdbj6NGBCUkj2I3YtPz+rBCcEXO6nghV/rPuCddNuo/+2Sp8DSjAaRBRTxlu5ehlDktZK2ekRhaXjd43qxPrWEXcC3kUi1DigprX25q3Bm+tuqcCQ8pFa9WV1eonhzg5BEhJcMWAnp4iXZ0mqxuVWeRscaFt7m98u9pG/KzHsHsQu5sMPKPt61O9nKqHMqrJqgkL+nyakIGtovjoxLQqhoQ2N41Wzyz2Hhf+f25zQBDPM= root@79192ad4f565
2020-03-21 16:06:40 +00:00
steps:
- name: Checkout
uses: actions/checkout@v2
2020-03-21 19:35:01 +00:00
- name: Test
run: |
2020-03-21 19:40:39 +00:00
apk -U add openssh
mkdir -p ~/.ssh
echo "${{secrets.SSH_PRIVATE_KEY}}" > ~/.ssh/id_rsa
2020-03-21 19:43:33 +00:00
chmod 600 ~/.ssh/id_rsa
2020-03-21 19:48:04 +00:00
ssh -v -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no user@alpine exit
2020-03-21 16:06:40 +00:00
- name: Run
uses: ./
with:
playbook: playbook.yml
key: ${{secrets.SSH_PRIVATE_KEY}}
2020-03-21 16:06:40 +00:00
options: |
2020-03-21 19:35:01 +00:00
--inventory=user@alpine,
2020-03-21 16:06:40 +00:00
--verbose