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:
parent
28b1d9e2f7
commit
0be5c5f39e
25
.github/workflows/ansible.yml
vendored
25
.github/workflows/ansible.yml
vendored
|
@ -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}}
|
||||
|
|
Loading…
Reference in New Issue
Block a user