Added sanitized Gitea Action
Some checks failed
Ansible Deploy / deploy (push) Has been cancelled

This commit is contained in:
2023-11-21 22:51:28 +02:00
parent c86ce4e215
commit 1d211becf1

View File

@@ -1,31 +1,37 @@
name: Ansible Deploy name: Ansible Deploy
on: on:
push: push:
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: Run Ansible Playbook - name: Checkout Ansible inventory
run: | run: |
ansible-playbook -i inventory.yaml -e 'ANSIBLE_SUDO_PASS="${{ secrets.SUDO_PASS }}" SKOPEO_PASS="${{ secrets.SKOPEO_PASS }}"' hatarashi-hako.yaml -vv INVENTORY_URL="https://my-user:${{ secrets.ANSIBLE_TOKEN }}@my.git.instance/my-user/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 }}" SKOPEO_PASS="${{ secrets.SKOPEO_PASS }}"' hatarashi-hako.yaml -vv