Files
homelab-infra/.gitea/workflows/ansible-core-net.yml
T
karpenokandCursor a0507719b0 refactor: drop the finished secrets migration from the deploy path
Product tags now come from the role directory, and edits to the CI scripts no longer redeploy every machine.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-11 00:09:23 +07:00

38 lines
1.2 KiB
YAML

name: ansible-core-net
on:
push:
branches:
- main
paths:
- 'ansible/roles/core-net/**'
- 'ansible/roles/host/**'
- 'ansible/playbooks/core-net.yml'
- 'ansible/playbooks/host.yml'
- 'ansible/playbooks/site.yml'
- 'ansible/inventories/prod/hosts.yml'
- 'ansible/inventories/prod/group_vars/**'
workflow_dispatch:
jobs:
deploy:
runs-on: homelab
container:
image: homelab-ansible:latest
timeout-minutes: 30
steps:
- name: Деплой core-net
env:
INFISICAL_CLIENT_ID: ${{ secrets.INFISICAL_CLIENT_ID }}
INFISICAL_CLIENT_SECRET: ${{ secrets.INFISICAL_CLIENT_SECRET }}
run: |
set -eu
rm -rf "${HOME}/homelab-infra"
git clone http://192.168.1.217:3000/karpenok/homelab-infra.git "${HOME}/homelab-infra"
sha="${GITHUB_SHA:-${GITEA_SHA:-}}"
if [ -n "${sha}" ]; then
git -C "${HOME}/homelab-infra" checkout "${sha}"
fi
chmod -R go-w "${HOME}/homelab-infra"
exec bash "${HOME}/homelab-infra/ansible/ci/deploy-machine.sh" core-net "${{ github.event_name }}" "${{ github.event.before }}" "${{ github.sha }}"