mirror of
https://github.com/dawidd6/action-ansible-playbook.git
synced 2024-11-22 15:32:18 +00:00
workflows: adjust
This commit is contained in:
parent
7730c96a9f
commit
89a799ad80
1 changed files with 12 additions and 9 deletions
21
.github/workflows/test.yml
vendored
21
.github/workflows/test.yml
vendored
|
@ -5,19 +5,22 @@ on: push
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
services:
|
|
||||||
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
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Test
|
- 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
|
||||||
|
docker run -t --name action --link host -e INPUT_PLAYBOOK=playbook.yml -e INPUT_KEY="${{secrets.SSH_PRIVATE_KEY}}" host
|
||||||
|
- name: Test local
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
playbook: playbook.yml
|
playbook: playbook.yml
|
||||||
key: ${{secrets.SSH_PRIVATE_KEY}}
|
key: ${{secrets.SSH_PRIVATE_KEY}}
|
||||||
options: |
|
options: |
|
||||||
--inventory alpine,
|
-e host=localhost
|
||||||
--verbose
|
-e user=root
|
||||||
|
-c local
|
||||||
|
-v
|
Loading…
Reference in a new issue