Update .woodpecker.yml
This commit is contained in:
@@ -1,19 +1,36 @@
|
|||||||
kind: pipeline # Defines this as a Woodpecker CI pipeline.
|
kind: pipeline # Defines this as a Woodpecker CI pipeline.
|
||||||
type: docker # Specifies that this pipeline will execute commands using Docker.
|
type: docker # Specifies that this pipeline will execute commands using Docker.
|
||||||
name: basic-test-pipeline # A simple name for this test pipeline.
|
name: restart-discord-bot # A descriptive name for your pipeline.
|
||||||
|
|
||||||
# Defines when this pipeline should be triggered.
|
# Defines when this pipeline should be triggered.
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- main # This pipeline will run when changes are pushed to the 'main' branch.
|
- main # This pipeline will only run when changes are pushed to the 'main' branch.
|
||||||
event:
|
event:
|
||||||
- push # Trigger on push events.
|
- push # The pipeline is triggered specifically by a 'push' event.
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: hello-world # Name of this single step.
|
- name: restart-bot # Name of the step that restarts your bot.
|
||||||
image: alpine/git # A small, common Docker image that includes basic utilities.
|
image: docker/compose:latest # Uses a Docker Compose-enabled image.
|
||||||
|
volumes:
|
||||||
|
- name: docker_sock
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
- name: docker_compose_dir
|
||||||
|
path: /app
|
||||||
commands:
|
commands:
|
||||||
- echo "Hello from Woodpecker CI!" # A simple command to print a message.
|
- cd /app
|
||||||
- echo "Pipeline triggered successfully."
|
# The command to restart your Discord bot service using Docker Compose.
|
||||||
- pwd # Print the current working directory (usually /woodpecker/src/<repo_owner>/<repo_name>)
|
# IMPORTANT: Replace 'your_bot_service_name' with the actual name
|
||||||
- ls -la # List files in the current directory (you should see your .woodpecker.yml here)
|
# of your Discord bot's service defined in your docker-compose.yml file.
|
||||||
|
# Use 'docker compose' for newer Docker versions (v2) or 'docker-compose' for older ones.
|
||||||
|
- docker compose restart python-app
|
||||||
|
# - docker-compose restart your_bot_service_name # Uncomment this line if you use older Docker Compose.
|
||||||
|
|
||||||
|
# Defines the volumes that are available to the steps in this pipeline.
|
||||||
|
volumes:
|
||||||
|
- name: docker_sock # A named volume for the Docker socket.
|
||||||
|
host:
|
||||||
|
path: /var/run/docker.sock # Maps the Docker socket from the host into the container.
|
||||||
|
- name: docker_compose_dir # A named volume for your Docker Compose project directory.
|
||||||
|
host:
|
||||||
|
path: /home/gary/Discord/Acrybot # The actual absolute path on your host machine.
|
||||||
|
|||||||
Reference in New Issue
Block a user