From 69f2bc1da32b1f061968036251480f4e0d384f5b Mon Sep 17 00:00:00 2001 From: shmick Date: Fri, 9 Feb 2024 12:00:55 +0200 Subject: [PATCH] Update .gitea/workflows/hatarashi-pasokom.yaml --- .gitea/workflows/hatarashi-pasokom.yaml | 78 ++++++++++++------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/.gitea/workflows/hatarashi-pasokom.yaml b/.gitea/workflows/hatarashi-pasokom.yaml index 8754652..0251e02 100644 --- a/.gitea/workflows/hatarashi-pasokom.yaml +++ b/.gitea/workflows/hatarashi-pasokom.yaml @@ -1,39 +1,39 @@ -name: Ansible Deploy - -on: - push: - schedule: - - cron: '00 23 * * *' - -jobs: - deploy: - runs-on: ubuntu-latest - - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - - - name: Set up Python - run: | - apt -y update - apt -y install python3 python3-pip skopeo - - - name: Install Ansible - run: | - python3 -m pip install --upgrade pip - pip install ansible - - - name: Set up SSH - uses: webfactory/ssh-agent@v0.5.0 - with: - ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - - - name: Checkout Ansible inventory - run: | - INVENTORY_URL="https://shmick:${{ secrets.ANSIBLE_TOKEN }}@git.pukeko.xyz/shmick/ansible/raw/branch/main/inventory.yaml" - curl -o inventory.yaml $INVENTORY_URL - cat inventory.yaml - - - name: Run Ansible Playbook - run: | - ansible-playbook -i inventory.yaml -e 'ANSIBLE_SUDO_PASS="${{ secrets.SUDO_PASS }}"' hatarashi-pasokom.yaml +name: Ansible Deploy + +#on: +# push: +# schedule: +# - cron: '00 23 * * *' + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Set up Python + run: | + apt -y update + apt -y install python3 python3-pip skopeo + + - name: Install Ansible + run: | + python3 -m pip install --upgrade pip + pip install ansible + + - name: Set up SSH + uses: webfactory/ssh-agent@v0.5.0 + with: + ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} + + - name: Checkout Ansible inventory + run: | + INVENTORY_URL="https://shmick:${{ secrets.ANSIBLE_TOKEN }}@git.pukeko.xyz/shmick/ansible/raw/branch/main/inventory.yaml" + curl -o inventory.yaml $INVENTORY_URL + cat inventory.yaml + + - name: Run Ansible Playbook + run: | + ansible-playbook -i inventory.yaml -e 'ANSIBLE_SUDO_PASS="${{ secrets.SUDO_PASS }}"' hatarashi-pasokom.yaml