Skip to content

Commit

Permalink
feat: publish container images to quay.io (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
xoxys authored Mar 28, 2023
1 parent 607fa58 commit 69acde0
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 11 deletions.
63 changes: 53 additions & 10 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,42 @@ 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
repo: owncloudops/${DRONE_REPO_NAME}
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:
Expand All @@ -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
Expand All @@ -71,6 +97,9 @@ steps:
when:
ref:
- refs/tags/**
depends_on:
- publish-dockerhub
- publish-quay

trigger:
ref:
Expand All @@ -87,18 +116,32 @@ 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
DOCKER_USER:
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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down

0 comments on commit 69acde0

Please sign in to comment.