forked from pepyatka/pepyatka-ansible
-
Notifications
You must be signed in to change notification settings - Fork 9
34 lines (27 loc) · 2.31 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: CI
on:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build image
run: docker build -t freefeed-ansible .github/
- run: echo "${{ secrets.ANSIBLE_VAULT_PASSWORD }}" > .vault_pass.txt
- name: Test server.yml
run: |
docker run --rm -v $PWD:/w -w /w --add-host freefeed.net:127.0.0.1 freefeed-ansible ansible-playbook --connection local -i candy --tags config --skip-tags handlers --vault-password-file .vault_pass.txt playbooks/server.yml
docker run --rm -v $PWD:/w -w /w --add-host freefeed.net:127.0.0.1 freefeed-ansible ansible-playbook --connection local -i freefeed --tags config --skip-tags handlers --vault-password-file .vault_pass.txt playbooks/server.yml
- name: Test react-client.yml
run: |
docker run --rm -v $PWD:/w -w /w --add-host freefeed.net:127.0.0.1 freefeed-ansible ansible-playbook --connection local -i candy --tags config --skip-tags handlers --vault-password-file .vault_pass.txt playbooks/react_client.yml
docker run --rm -v $PWD:/w -w /w --add-host freefeed.net:127.0.0.1 freefeed-ansible ansible-playbook --connection local -i beta --tags config --skip-tags handlers --vault-password-file .vault_pass.txt playbooks/react_client.yml
docker run --rm -v $PWD:/w -w /w --add-host freefeed.net:127.0.0.1 freefeed-ansible ansible-playbook --connection local -i freefeed --tags config --skip-tags handlers --vault-password-file .vault_pass.txt playbooks/react_client.yml
- name: Test nginx.yml
run: |
docker run --rm -v $PWD:/w -w /w --add-host freefeed.net:127.0.0.1 freefeed-ansible ansible-playbook --connection local -i candy --tags config --skip-tags handlers --vault-password-file .vault_pass.txt playbooks/nginx.yml
docker run --rm -v $PWD:/w -w /w --add-host freefeed.net:127.0.0.1 freefeed-ansible ansible-playbook --connection local -i beta --tags config --skip-tags handlers --vault-password-file .vault_pass.txt playbooks/nginx.yml
docker run --rm -v $PWD:/w -w /w --add-host freefeed.net:127.0.0.1 freefeed-ansible ansible-playbook --connection local -i freefeed --tags config --skip-tags handlers --vault-password-file .vault_pass.txt playbooks/nginx.yml
- run: rm -f .vault_pass.txt
if: always()