--- kind: pipeline type: docker name: default steps: - name: test image: python:3.10 commands: - python -m pip install poetry - poetry install - poetry env info - poetry run pytest - name: build container (prod) image: plugins/docker settings: repo: registry.kucharczyk.xyz/timetracker tags: - latest when: branch: - main - name: build container (non-prod) image: plugins/docker settings: repo: registry.kucharczyk.xyz/timetracker tags: - ${DRONE_COMMIT_REF} - ${DRONE_COMMIT_BRANCH} when: branch: exclude: - main - name: redeploy on portainer image: plugins/webhook settings: urls: [ https://portainer.kucharczyk.xyz/api/webhooks/$ID ] depends_on: - "build container (non-prod)" environment: ID: from_secret: PORTAINER_TIMETRACKER_WEBHOOK_ID trigger: event: - push - cron