diff --git a/.drone.yml b/.drone.yml index ff550da..b9b7b4f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -19,17 +19,21 @@ steps: commands: - src/bin/registry --help - src/bin/registry --version + depends_on: + - build - name: tags - image: thegeeklab/docker-autotag + image: quay.io/thegeeklab/docker-autotag environment: DOCKER_AUTOTAG_FORCE_LATEST: True DOCKER_AUTOTAG_IGNORE_PRERELEASE: True DOCKER_AUTOTAG_OUTPUT_FILE: .tags DOCKER_AUTOTAG_VERSION: ${DRONE_TAG} + depends_on: + - executable - name: dryrun - image: plugins/docker + image: docker.io/plugins/docker settings: dockerfile: Dockerfile dry_run: true @@ -37,17 +41,20 @@ steps: when: ref: - refs/pull/** + depends_on: + - tags - name: changelog - image: thegeeklab/git-chglog + image: quay.io/thegeeklab/git-chglog commands: - git fetch -tq - git-chglog --no-color --no-emoji ${DRONE_TAG:---next-tag unreleased unreleased} - git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased} + depends_on: + - dryrun - -- name: publish - image: plugins/docker +- name: publish-dockerhub + image: docker.io/plugins/docker settings: dockerfile: Dockerfile password: @@ -59,9 +66,28 @@ steps: ref: - refs/heads/main - refs/tags/** + depends_on: + - changelog + +- name: publish-quay + image: docker.io/plugins/docker + settings: + dockerfile: Dockerfile + password: + from_secret: quay_password + registry: quay.io + repo: quay.io/owncloudops/${DRONE_REPO_NAME} + username: + from_secret: quay_username + when: + ref: + - refs/heads/main + - refs/tags/** + depends_on: + - changelog - name: release - image: plugins/github-release + image: docker.io/plugins/github-release settings: api_key: from_secret: github_token @@ -71,6 +97,9 @@ steps: when: ref: - refs/tags/** + depends_on: + - publish-dockerhub + - publish-quay trigger: ref: @@ -87,8 +116,8 @@ platform: arch: amd64 steps: -- name: pushrm - image: chko/docker-pushrm:1 +- name: pushrm-dockerhub + image: docker.io/chko/docker-pushrm:1 environment: DOCKER_PASS: from_secret: docker_password @@ -96,9 +125,23 @@ steps: from_secret: docker_username PUSHRM_FILE: README.md PUSHRM_TARGET: owncloudops/${DRONE_REPO_NAME} + when: + status: + - success + +- name: pushrm-quay + image: docker.io/chko/docker-pushrm:1 + environment: + APIKEY__QUAY_IO: + from_secret: quay_token + PUSHRM_FILE: README.md + PUSHRM_TARGET: quay.io/owncloudops/${DRONE_REPO_NAME} + when: + status: + - success - name: notify - image: plugins/slack + image: docker.io/plugins/slack settings: channel: from_secret: slack_channel diff --git a/Dockerfile b/Dockerfile index 8666cfa..a0062d0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM amd64/alpine:3.17@sha256:e2e16842c9b54d985bf1ef9242a313f36b856181f188de21313820e177002501 +FROM docker.io/amd64/alpine:3.17@sha256:e2e16842c9b54d985bf1ef9242a313f36b856181f188de21313820e177002501 LABEL maintainer="ownCloud GmbH" LABEL org.opencontainers.image.authors="ownCloud GmbH" diff --git a/README.md b/README.md index c592609..5e72341 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Build Status](https://drone.owncloud.com/api/badges/owncloud-ops/registry/status.svg)](https://drone.owncloud.com/owncloud-ops/registry/) [![Docker Hub](https://img.shields.io/badge/docker-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/owncloudops/registry) +[![Quay.io](https://img.shields.io/badge/quay-latest-blue.svg?logo=docker&logoColor=white)](https://quay.io/repository/owncloudops/registry) Custom container image for the [Container Registry](https://github.com/distribution/distribution).