Update actions/checkout action to v4 #36
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# yamllint disable rule:line-length | |
name: Deploy pihole | |
on: # yamllint disable-line rule:truthy | |
push: | |
branches: | |
- main | |
paths: | |
- roles/pihole/** | |
- .github/workflows/pihole.yaml | |
pull_request: | |
paths: | |
- roles/pihole/** | |
- .github/workflows/pihole.yaml | |
jobs: | |
pihole: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: ./.github/actions/setup-ansible | |
- run: | | |
# Pull the image before (hack that should be removed) | |
docker compose --file roles/pihole/files/compose.yaml pull | |
# These lines are from https://github.com/pi-hole/docker-pi-hole, | |
# should really be part of the ansible role but currently running | |
# pihole on Raspberry Pi OS were this is not needed. | |
sudo sed -r -i.orig 's/#?DNSStubListener=yes/DNSStubListener=no/g' /etc/systemd/resolved.conf | |
sudo sh -c 'rm /etc/resolv.conf && ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf' | |
sudo systemctl restart systemd-resolved | |
- run: | | |
ansible-playbook main.yaml --limit localhost --tags pihole | |
docker ps --filter name=pihole | grep --quiet pihole |