Files
ansible-repo/.gitea/workflows/act.yaml
hogweed1 253963bf6f
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 0s
upd ansi
2025-11-22 03:22:33 +10:00

56 lines
1.8 KiB
YAML

name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
jobs:
Explore-Gitea-Actions:
runs-on: linux-amd64
#defaults:
# run:
# shell: bash
steps:
# echo "export PYENV_ROOT=\"$HOME/.pyenv\"" >> $GITHUB_ENV
# echo "export PATH=\"$PYENV_ROOT/bin:$PATH\"" >> $GITHUB_ENV
# echo "command -v pyenv >/dev/null || export PATH=\"$PYENV_ROOT/bin:$PATH\"" >> $GITHUB_ENV
# echo "eval \"$(pyenv init -)\"" >> $GITHUB_ENV
# source $GITHUB_ENV
# cat $GITHUB_ENV
- name: common-setup-just-created
run: |
cd /usr/share/ansible-repo/
git pull
python3 --version
shell: bash
#./playbooker.sh
# - name: common-setup-just-created
# run: |
# #!/bin/bash
# # Get the list of changed files
# CHANGED_FILES=$(git diff --name-only HEAD~1 HEAD)
# # Initialize an array for playbooks to run
# PLAYBOOKS_TO_RUN=()
# # Check for changes in specific directories and add corresponding playbooks
# if echo "$CHANGED_FILES" | grep -q "roles/webserver/"; then
# PLAYBOOKS_TO_RUN+=("playbooks/webserver.yml")
# fi
# if echo "$CHANGED_FILES" | grep -q "roles/database/"; then
# PLAYBOOKS_TO_RUN+=("playbooks/database.yml")
# fi
# # Run the identified playbooks
# if [ ${#PLAYBOOKS_TO_RUN[@]} -gt 0 ]; then
# for playbook in "${PLAYBOOKS_TO_RUN[@]}"; do
# echo "Running playbook: $playbook"
# ansible-playbook "$playbook" -i inventory.ini
# done
# else
# echo "No relevant playbooks modified. Skipping Ansible run."
# fi
# shell: bash