.push.yml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. when:
  2. event:
  3. - push
  4. - pull_request
  5. - manual
  6. steps:
  7. pre-commit:
  8. image: git.snas.black-burn.ch/sean/poetry-in-a-container:3.11
  9. volumes:
  10. - /tmp-woodpecker/cache/poetry:/root/.cache/pypoetry/virtualenvs
  11. - /tmp-woodpecker/cache/pip:/root/.cache/pip/
  12. - /tmp-woodpecker/cache/pre_commit_environments:/root/.cache/pre-commit
  13. commands:
  14. - poetry install
  15. - pre-commit run -a
  16. build-latest:
  17. image: woodpeckerci/plugin-docker-buildx
  18. settings:
  19. username:
  20. from_secret: NUCNAS_GITEA_DOCKER_USERNAME
  21. password:
  22. from_secret: NUCNAS_GITEA_DOCKER_PASSWORD
  23. repo: git.snas.black-burn.ch/${CI_REPO,,}
  24. registry: git.snas.black-burn.ch
  25. platforms: linux/amd64
  26. auto_tag: true
  27. when:
  28. branch:
  29. exclude:
  30. - renovate/*
  31. volumes:
  32. - /var/run/docker.sock:/var/run/docker.sock
  33. semantic-release:
  34. image: git.snas.black-burn.ch/sean/semantic-release-in-a-container:1
  35. secrets:
  36. - GITEA_SEMANTIC_RELEASE_TOKEN
  37. commands:
  38. - export GITEA_URL=https://git.snas.black-burn.ch
  39. - export GITEA_TOKEN=$${GITEA_SEMANTIC_RELEASE_TOKEN}
  40. - export GIT_CREDENTIALS="Sean:$${GITEA_SEMANTIC_RELEASE_TOKEN}"
  41. - semantic-release
  42. when:
  43. branch:
  44. - "*.*.x"
  45. - main
  46. - master
  47. - next
  48. - next-major
  49. - beta
  50. - alpha
  51. notify:
  52. image: git.snas.black-burn.ch/sean/woodpecker-apprise:1
  53. when:
  54. - status: [failure, success]
  55. - branch:
  56. exclude:
  57. - renovate/*
  58. settings:
  59. evaluate: "not pipeline.success or not prev_pipeline.success"
  60. services:
  61. - url:
  62. from_secret: APPRISE_NOTIFICATION_URL
  63. content:
  64. title: "{% if pipeline.success %}🤠{% else %}🚨{% endif %} | {{ repo.full_name }} ({{ commit.branch }} - {{ commit.sha[0:8] }})"
  65. body: |
  66. The pipeline has {% if pipeline.success %}been fixed 🤠{% else %}failed 🚨{% endif %}.
  67. View Pipeline: {{ pipeline.url }}
  68. View Repo: {{ repo.url }}