init main
This commit is contained in:
50
.gitea/workflows/update.yml
Normal file
50
.gitea/workflows/update.yml
Normal file
@@ -0,0 +1,50 @@
|
||||
name: Run Ansible Playbook
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
force:
|
||||
type: boolean
|
||||
description: "Force re-install"
|
||||
required: true
|
||||
default: false
|
||||
version:
|
||||
description: "Golang version"
|
||||
required: true
|
||||
target:
|
||||
description: "Target hosts"
|
||||
required: true
|
||||
default: "prodesk"
|
||||
type: choice
|
||||
options:
|
||||
- "all"
|
||||
- "prodesk"
|
||||
|
||||
jobs:
|
||||
ansible-job:
|
||||
runs-on: homelab
|
||||
container:
|
||||
image: dtrotskiy/ansible
|
||||
|
||||
steps:
|
||||
- name: debug
|
||||
run: |
|
||||
echo "10.10.1.10 gitea.bwonsamdi.ru" >> /etc/hosts
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
curl -v https://gitea.bwonsamdi.ru/HomeLab/gonfig.git
|
||||
|
||||
- name: Checkout code
|
||||
run: |
|
||||
git clone https://gitea.bwonsamdi.ru/HomeLab/gonfig.git dump
|
||||
|
||||
- name: Setup SSH key
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
|
||||
- name: Run Ansible playbook
|
||||
run: |
|
||||
ansible-playbook ./dump/playbook.yml -i ./dump/hosts.yml -e "go_version=${{ inputs.version }} force=${{ inputs.force }} TARGET=prodesk"
|
||||
Reference in New Issue
Block a user