Update .gitea/workflows/hatarashi-pasokom.yaml
This commit is contained in:
@@ -1,39 +1,39 @@
|
|||||||
name: Ansible Deploy
|
name: Ansible Deploy
|
||||||
|
|
||||||
on:
|
#on:
|
||||||
push:
|
# push:
|
||||||
schedule:
|
# schedule:
|
||||||
- cron: '00 23 * * *'
|
# - cron: '00 23 * * *'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
run: |
|
run: |
|
||||||
apt -y update
|
apt -y update
|
||||||
apt -y install python3 python3-pip skopeo
|
apt -y install python3 python3-pip skopeo
|
||||||
|
|
||||||
- name: Install Ansible
|
- name: Install Ansible
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install --upgrade pip
|
python3 -m pip install --upgrade pip
|
||||||
pip install ansible
|
pip install ansible
|
||||||
|
|
||||||
- name: Set up SSH
|
- name: Set up SSH
|
||||||
uses: webfactory/ssh-agent@v0.5.0
|
uses: webfactory/ssh-agent@v0.5.0
|
||||||
with:
|
with:
|
||||||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
|
|
||||||
- name: Checkout Ansible inventory
|
- name: Checkout Ansible inventory
|
||||||
run: |
|
run: |
|
||||||
INVENTORY_URL="https://shmick:${{ secrets.ANSIBLE_TOKEN }}@git.pukeko.xyz/shmick/ansible/raw/branch/main/inventory.yaml"
|
INVENTORY_URL="https://shmick:${{ secrets.ANSIBLE_TOKEN }}@git.pukeko.xyz/shmick/ansible/raw/branch/main/inventory.yaml"
|
||||||
curl -o inventory.yaml $INVENTORY_URL
|
curl -o inventory.yaml $INVENTORY_URL
|
||||||
cat inventory.yaml
|
cat inventory.yaml
|
||||||
|
|
||||||
- name: Run Ansible Playbook
|
- name: Run Ansible Playbook
|
||||||
run: |
|
run: |
|
||||||
ansible-playbook -i inventory.yaml -e 'ANSIBLE_SUDO_PASS="${{ secrets.SUDO_PASS }}"' hatarashi-pasokom.yaml
|
ansible-playbook -i inventory.yaml -e 'ANSIBLE_SUDO_PASS="${{ secrets.SUDO_PASS }}"' hatarashi-pasokom.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user