.tag.yml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. when:
  2. event:
  3. - tag
  4. - deployment
  5. steps:
  6. publish-docker:
  7. image: woodpeckerci/plugin-docker-buildx
  8. settings:
  9. username:
  10. from_secret: NUCNAS_GITEA_DOCKER_USERNAME
  11. password:
  12. from_secret: NUCNAS_GITEA_DOCKER_PASSWORD
  13. repo: git.snas.black-burn.ch/${CI_REPO,,}
  14. registry: git.snas.black-burn.ch
  15. platforms: linux/amd64
  16. auto_tag: true
  17. volumes:
  18. - /var/run/docker.sock:/var/run/docker.sock
  19. publish-pypi:
  20. image: python:3.11
  21. volumes:
  22. - /tmp-woodpecker/cache/poetry:/root/.cache/pypoetry/virtualenvs
  23. - /tmp-woodpecker/cache/pip:/root/.cache/pip/
  24. secrets:
  25. - GITEA_REPO_USERNAME
  26. - GITEA_REPO_PASSWORD
  27. commands:
  28. - pip install poetry
  29. - poetry config repositories.gitea https://git.snas.black-burn.ch/api/packages/${CI_REPO_OWNER,,}/pypi
  30. - poetry publish --build --repository gitea --username $${GITEA_REPO_USERNAME} --password $${GITEA_REPO_PASSWORD}
  31. when:
  32. event: tag
  33. branch:
  34. exclude:
  35. - renovate/*
  36. notify:
  37. image: git.snas.black-burn.ch/sean/woodpecker-apprise:1
  38. when:
  39. - status: [failure, success]
  40. - branch:
  41. exclude:
  42. - renovate/*
  43. settings:
  44. evaluate: "not pipeline.success"
  45. services:
  46. - url:
  47. from_secret: APPRISE_NOTIFICATION_URL
  48. content:
  49. title: "{% if pipeline.success %}🎉{% else %}🚨{% endif %} | {{ repo.full_name }} ({{ commit.branch }} - {{ commit.sha[0:8] }})"
  50. body: |
  51. {% if pipeline.success %}
  52. 🎉 New release published: {{ commit.tag }}
  53. {% else %}
  54. 🚨 New release published, but the build failed: {{ commit.tag }}
  55. {% endif %}
  56. View Pipeline: {{ pipeline.url }}
  57. View Repo: {{ repo.url }}