kind: pipeline type: docker name: ci steps: - name: build image: debian:12 volumes: - name: docker path: /var/lib/docker - name: dockersocket path: /var/run/docker.sock commands: - sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/bin # install task - task setup-docker - task setup-buildx BUILDER_NAME=builder${DRONE_COMMIT_SHA}${DRONE_BUILD_NUMBER} - tag=$${DRONE_TAG:-$DRONE_BRANCH} # set tag to tag name (if applicable) or branch name - task build TAG=$tag # build the docker image - name: publish tag image: debian:12 depends_on: - build environment: PASSOWRD: from_secret: FORGEJO_PASSWORD volumes: - name: docker path: /var/lib/docker - name: dockersocket path: /var/run/docker.sock commands: - sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/bin # install task - task setup-docker - docker login -u drone -p ${PASSWORD} - tag=$${DRONE_TAG:-$DRONE_BRANCH} # set tag to tag name (if applicable) or branch name - task push TAG=$tag when: event: - tag - name: publish main image: debian:12 depends_on: - build environment: PASSOWRD: from_secret: FORGEJO_PASSWORD volumes: - name: docker path: /var/lib/docker - name: dockersocket path: /var/run/docker.sock commands: - sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/bin # install task - task setup-docker - docker login -u drone -p ${PASSWORD} - task push TAG=main when: branch: - main volumes: - name: dockersocket host: path: /var/run/docker.sock - name: docker temp: {}