don't excessively fail action
All checks were successful
Deploy Containers / Prepare (push) Successful in 4s

This commit is contained in:
2025-08-11 03:01:36 -04:00
parent ecaf52f268
commit 0772ea36d0
2 changed files with 29 additions and 9 deletions

View File

@@ -0,0 +1,26 @@
name: Deploy All Containers
on:
workflow_dispatch:
jobs:
deploy:
name: Prepare
runs-on: runner
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Deploy
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_KNOWN_HOSTS }}" >> ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts
eval $(ssh-agent -s)
ssh-add <(echo "${{ secrets.SSH_KEY }}")
echo "HOST *" > ~/.ssh/config
echo "${{ secrets.VAULT_PASS }}" > ~/.vault_pass.txt
chmod 600 ansible.cfg
/usr/bin/ansible-playbook main.yml --vault-password-file ~/.vault_pass.txt

View File

@@ -29,19 +29,13 @@ def run_deployment(tag = None):
success = True
for ind, line in enumerate(lines):
if "fatal:" in line:
success = False
host = re.findall(bracket_regex, line)[0]
task_failed = re.findall(bracket_regex, lines[ind - 1])[0]
reason_failed = re.findall(quote_regex, line)
print("\n---------------------")
print(" Deployment failed!")
print(f" Task: {task_failed}")
print(f" Host: {host}")
print(f" Reason: {reason_failed}")
print(line)
print("---------------------\n")
sys.exit(1)
print(f"\n{tag} failed deployment!\n{host}\n{reason_failed}\n{task_failed}\n")
break
return success