add support for task environment var

This commit is contained in:
2026-09-07 13:53:49 -04:00
parent 592a7cc9d8
commit f6755523f2
3 changed files with 14 additions and 29 deletions
-27
View File
@@ -1,27 +0,0 @@
name: Deploy All Containers
on:
workflow_dispatch:
jobs:
deploy:
name: Prepare
runs-on: ansible
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Deploy
shell: sh
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 -l jackson --vault-password-file ~/.vault_pass.txt
+7
View File
@@ -9,6 +9,11 @@ on:
- "roles/**"
- "templates/**"
workflow_dispatch:
inputs:
task:
description: Task to deploy
required: false
type: string
jobs:
deploy:
@@ -21,6 +26,8 @@ jobs:
fetch-depth: 0
- name: Deploy
env:
TASK: ${{ inputs.task }}
shell: sh
run: |
mkdir -p ~/.ssh