Files
casa/.gitea/workflows/host.yml
Márcio Fernandes 75840bb0d2
Some checks failed
deploy host / ansible-playbook (push) Waiting to run
deploy host / setup-runner (push) Has been cancelled
..
2024-09-01 03:17:23 +01:00

61 lines
1.5 KiB
YAML

name: deploy host
on:
push:
paths-ignore:
- "services/**"
- "docs/**"
- ".gitea/workflows/**services**.yml"
jobs:
setup-runner:
runs-on: homesrv01
container:
image: catthehacker/ubuntu:act-latest
volumes:
- workspace:/workspace
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: build git runner
shell: bash
run: |
docker build ${{gitea.workspace}}/services/git-runner --tag homesrv/git-runner
ansible-playbook:
runs-on: homesrv01
container:
image: homesrv/git-runner
volumes:
- workspace:/workspace
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Run Ansible Playbook
env:
#ANSIBLE_USER: ${{ secrets.ANSIBLE_USER }}
ANSIBLE_HOST_KEY_CHECKING: False
run: |
wget http://${{secrets.SERVER_ADDRESS}}
ansible-playbook \
-i ${{secrets.SERVER_ADDRESS}}, ${{gitea.workspace}}/ansible/site.yml \
--private-key xxxx \
-u xxxx
# - name: Install Ansible
# shell: bash
# run: |
# sudo apt update
# sudo apt install -y ansible
# - name: Docker tests
# run: |
# docker pull librespace/ansible
# docker run \
# --mount type=bind,source="$(pwd)"/ansible,target=/ansible \
# librespace/ansible \
# ansible-playbook ansible/site.yml --private-key xxxx -u xxxx