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

26 lines
750 B
YAML
Raw Normal View History

2020-03-21 16:06:40 +00:00
name: Test Action
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
2020-03-22 11:17:17 +00:00
- name: Checkout code
2020-03-21 16:06:40 +00:00
uses: actions/checkout@v2
2020-03-22 11:17:17 +00:00
- name: Test remote
run: |
docker build -t host -f Dockerfile.test .
docker build -t action -f Dockerfile .
docker run -d --name host -e SSH_PUBLIC_KEY="${{secrets.SSH_PUBLIC_KEY}}" host
2020-03-22 11:22:12 +00:00
docker run -t --name action --link host -e INPUT_PLAYBOOK=playbook.yml -e INPUT_KEY="${{secrets.SSH_PRIVATE_KEY}}" action
2020-03-22 11:17:17 +00:00
- name: Test local
2020-03-21 16:06:40 +00:00
uses: ./
with:
playbook: playbook.yml
key: ${{secrets.SSH_PRIVATE_KEY}}
2020-03-21 16:06:40 +00:00
options: |
2020-03-22 11:17:17 +00:00
-e host=localhost
-e user=root
-c local
-v