kind: pipeline type: docker name: build-main-images trigger: event: exclude: - pull_request ref: - refs/heads/main - refs/tags/** platform: os: linux arch: amd64 steps: - name: get-tags image: docker:git commands: - git fetch --tags when: ref: - refs/tags/** # Set tags for main branch - name: make-tags image: node commands: - echo -n "${DRONE_COMMIT_SHA:0:8}, latest" > .tags when: ref: - refs/heads/main - name: make-tags-release image: node commands: - echo -n "${DRONE_TAG}, latest" > .tags when: ref: - refs/tags/** # Build containers from main branch - name: build-gitea image: thegeeklab/drone-docker-buildx privileged: true settings: provenance: false registry: git.mrmeeb.stream username: from_secret: docker_username password: from_secret: docker_password repo: git.mrmeeb.stream/mrmeeb/cronicle platforms: - linux/arm64 - linux/amd64 - name: build-github image: thegeeklab/drone-docker-buildx privileged: true settings: provenance: false registry: ghcr.io username: from_secret: docker_username password: from_secret: github_token repo: ghcr.io/mrmeeb/cronicle platforms: - linux/arm64 - linux/amd64 - name: release-gitea image: goreleaser/goreleaser environment: GITEA_TOKEN: from_secret: gitea_token commands: - goreleaser release -f .goreleaser-gitea.yaml when: ref: - refs/tags/** depends_on: - build-gitea - name: release-github image: goreleaser/goreleaser environment: GITHUB_TOKEN: from_secret: github_token commands: - goreleaser release -f .goreleaser-github.yaml when: ref: - refs/tags/** depends_on: - build-github - name: notify image: plugins/slack when: status: - success - failure settings: webhook: from_secret: slack_webhook depends_on: - release-gitea - release-github --- kind: pipeline type: docker name: build-develop-images trigger: event: exclude: - pull_request branch: - develop platform: os: linux arch: amd64 steps: # Set tags for develop branch - git commit SHA and 'develop' - name: make-tags image: node commands: - echo -n "develop-${DRONE_COMMIT_SHA:0:8}, develop" > .tags # Build containers from develop branch - name: build-gitea image: thegeeklab/drone-docker-buildx privileged: true settings: provenance: false registry: git.mrmeeb.stream username: from_secret: docker_username password: from_secret: docker_password repo: git.mrmeeb.stream/mrmeeb/cronicle platforms: - linux/arm64 - linux/amd64 - name: build-github image: thegeeklab/drone-docker-buildx privileged: true settings: provenance: false registry: ghcr.io username: from_secret: docker_username password: from_secret: github_token repo: ghcr.io/mrmeeb/cronicle platforms: - linux/arm64 - linux/amd64 - name: notify image: plugins/slack when: status: - success - failure settings: webhook: from_secret: slack_webhook depends_on: - build-gitea - build-github