Files
casa/.gitea/workflows/host.yml
Márcio Fernandes 258b57a35b
All checks were successful
deploy host / setup-runner (push) Successful in 3s
deploy host / ansible-playbook (push) Successful in 3s
.
2024-09-01 02:38:59 +01:00

56 lines
1.4 KiB
YAML

name: deploy host
on:
push:
paths-ignore:
- "services/**"
- "docs/**"
- ".gitea/workflows/**services**.yml"
jobs:
setup-runner:
runs-on: ubuntu-latest
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: ubuntu-latest
container:
image: homesrv/git-runner
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://google.com
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