1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-21 19:11:30 +01:00

gha: cleanup ansible workflow

This commit is contained in:
bretello 2024-07-05 22:30:15 +02:00
parent 28b1d9e2f7
commit 0be5c5f39e
Signed by: brethil
GPG Key ID: 876AAC6290170FE7

View File

@ -10,28 +10,35 @@ on:
jobs:
ansible:
runs-on: archlinux-latest
runs-on: ubuntu-latest
container:
image: registry.decapod.one/archlinux-toolchain:latest
credentials:
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install ansible
run: |
pacman -Sy
pacman -S ansible --noconfirm
pacman -Sy --noconfirm ansible openssh
- name: Setup local inventory
run: |
echo "localhost ansible_user=root connection=local" > ansible-hosts
echo "localhost ansible_user=root ansible_connection=local" > dev/ansible-hosts
- name: Run playbook
run: |
ansible-playbook -i ansible-hosts playbook.yml
cd dev
ansible-playbook -i ansible-hosts ../playbook.yml
- name: Notify on failure
if: failure()
run: |
python -m venv .
./bin/pip install git+https://git.decapod.one/brethil/bretellofier
./bin/bretellofier "[brethil/dotfiles] 💥 Build failed"
bretellofier "[brethil/dotfiles] 💥 Build failed"
env:
BRETELLOFIER_RECIPIENTS: ${{ secrets.BRETELLOFIER_RECIPIENTS }}
BRETELLOFIER_TOKEN: ${{ secrets.BRETELLOFIER_TOKEN}}