From 68d366822b0e62dda3ebb749dd6ede69266b1633 Mon Sep 17 00:00:00 2001 From: BigGamerGary Date: Wed, 13 Aug 2025 18:21:13 +1000 Subject: [PATCH] Added woodpecker file --- .woodpecker | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .woodpecker diff --git a/.woodpecker b/.woodpecker new file mode 100644 index 0000000..6d42216 --- /dev/null +++ b/.woodpecker @@ -0,0 +1,32 @@ +kind: pipeline # Defines this as a Woodpecker CI pipeline. +type: docker # Specifies that this pipeline will execute commands using Docker. +name: restart-discord-bot # A descriptive name for your pipeline. + +# Defines when this pipeline should be triggered. +trigger: + branch: + - main # This pipeline will only run when changes are pushed to the 'main' branch. + event: + - push # The pipeline is triggered specifically by a 'push' event. + +steps: + - name: restart-bot # Name of this specific step in the pipeline. + image: docker:latest # Uses the official Docker image, which includes the Docker CLI. + # This volume mount allows the Docker CLI inside the Woodpecker agent container + # to communicate with the Docker daemon on the host machine. This is crucial + # for being able to restart containers running on the host. + volumes: + - name: docker_sock + path: /var/run/docker.sock + commands: + # The command to restart your Discord bot container. + # IMPORTANT: Replace 'YOUR_DISCORD_BOT_CONTAINER_NAME' with the actual name + # of your Discord bot's Docker container. + # You can find the container name using 'docker ps' on your server. + - docker restart YOUR_DISCORD_BOT_CONTAINER_NAME + +# Defines the volumes that are available to the steps in this pipeline. +volumes: + - name: docker_sock # A named volume. + host: + path: /var/run/docker.sock # Maps the Docker socket from the host into the container.