1
0
Fork 0

migrate from drone to gitea-runner
Build Container Image / buildamd64 (push) Successful in 1m20s Details
Build Container Image / packageamd64 (push) Successful in 15s Details
Build Container Image / publishamd64 (push) Successful in 29s Details
Build Container Image / buildarm64 (push) Successful in 3m3s Details
Build Container Image / packagearm64 (push) Successful in 8s Details
Build Container Image / publisharm64 (push) Successful in 11s Details
Build Container Image / manifestpkg (push) Successful in 12s Details
Build Container Image / manifesthub (push) Successful in 14s Details

This commit is contained in:
Daniel Wolf 2023-05-01 15:16:01 -04:00
parent de64f0442f
commit c28d45ac33
Signed by: nephatrine
GPG Key ID: 59D70EC2E4AAB4D0
5 changed files with 153 additions and 76 deletions

View File

@ -1,66 +0,0 @@
---
kind: pipeline
type: exec
name: default
platform:
os: linux
arch: amd64
steps:
- name: build
environment:
PDR_USER:
from_secret: docker-user-pdr
PDR_PASS:
from_secret: docker-pass-pdr
commands:
- docker build -t pdr.nephatrine.net/nephatrine/docker-registry:cached --target builder .
- docker build -t pdr.nephatrine.net/nephatrine/docker-registry:latest .
- docker login -p "$PDR_PASS" -u "$PDR_USER" pdr.nephatrine.net
- docker push pdr.nephatrine.net/nephatrine/docker-registry:latest
- docker logout pdr.nephatrine.net
- name: publish
environment:
DOCKER_USER:
from_secret: docker-user
DOCKER_PASS:
from_secret: docker-pass
commands:
- docker tag pdr.nephatrine.net/nephatrine/docker-registry:latest nephatrine/docker-registry:latest
- docker login -p "$DOCKER_PASS" -u "$DOCKER_USER"
- docker push -a nephatrine/docker-registry
- docker logout
depends_on:
- build
---
kind: pipeline
name: notify
steps:
- name: notify-status
image: appleboy/drone-discord
failure: ignore
settings:
avatar_url: https://nephatrine.net/images/buttons/drone-ci.png
message: "Build of **[{{repo.name}}:{{commit.branch}}](<https://code.nephatrine.net/nephatrine/{{repo.name}}/src/branch/{{commit.branch}}>)** returned [{{build.status}}](<{{build.link}}>)."
username: DroneCI
webhook_id:
from_secret: wh-infra-id
webhook_token:
from_secret: wh-infra-tok
depends_on:
- default
trigger:
status:
- success
- failure
---
kind: signature
hmac: a9f729c5834505eb4cf79b1050ad4f06ab1270c110d4abab52e948fd139bfc92
...

134
.gitea/workflows/build.yaml Normal file
View File

@ -0,0 +1,134 @@
name: Build Container Image
run-name: ${{ gitea.actor }} pushed to ${{ gitea.repository }}:${{ gitea.ref_name }}
on: [push, workflow_call]
jobs:
buildamd64:
if: gitea.repository_owner == 'NephNET' && !contains(github.event.head_commit.message, '#noci')
runs-on: nephnet
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Docker Build
run: |
docker build --pull -t code.nephatrine.net/nephnet/docker-registry:${{ gitea.ref_name }}-cached --target builder ${{ gitea.workspace }}
docker build --pull -t code.nephatrine.net/nephnet/docker-registry:${{ gitea.ref_name }}-amd64 ${{ gitea.workspace }}
- name: Notify Discord
uses: actions/discord-status@v1
if: always()
with:
title: "Container Build (X86_64)"
webhook: ${{ secrets.DISCORD_WEBHOOK_BUILD }}
buildarm64:
if: gitea.repository_owner == 'NephNET' && !contains(github.event.head_commit.message, '#noci')
runs-on: nephnet-arm64
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Docker Build
run: |
docker build --pull -t code.nephatrine.net/nephnet/docker-registry:${{ gitea.ref_name }}-cached --target builder ${{ gitea.workspace }}
docker build --pull -t code.nephatrine.net/nephnet/docker-registry:${{ gitea.ref_name }}-arm64v8 ${{ gitea.workspace }}
- name: Notify Discord
uses: actions/discord-status@v1
if: always()
with:
title: "Container Build (AARCH64)"
webhook: ${{ secrets.DISCORD_WEBHOOK_BUILD }}
packageamd64:
if: gitea.repository_owner == 'NephNET' && gitea.ref_name == 'master'
needs: [buildamd64]
runs-on: nephnet
steps:
- name: Docker Login
uses: actions/docker-login@v2
with:
registry: code.nephatrine.net
username: ${{ gitea.actor }}
password: ${{ secrets.PACKAGER_TOKEN }}
- name: Docker Push
run: docker push code.nephatrine.net/nephnet/docker-registry:${{ gitea.ref_name }}-amd64
packagearm64:
if: gitea.repository_owner == 'NephNET' && gitea.ref_name == 'master'
needs: [buildarm64]
runs-on: nephnet-arm64
steps:
- name: Docker Login
uses: actions/docker-login@v2
with:
registry: code.nephatrine.net
username: ${{ gitea.actor }}
password: ${{ secrets.PACKAGER_TOKEN }}
- name: Docker Push
run: docker push code.nephatrine.net/nephnet/docker-registry:${{ gitea.ref_name }}-arm64v8
manifestpkg:
if: gitea.repository_owner == 'NephNET' && gitea.ref_name == 'master'
needs: [packageamd64, packagearm64]
runs-on: nephnet
steps:
- name: Docker Login
uses: actions/docker-login@v2
with:
registry: code.nephatrine.net
username: ${{ gitea.actor }}
password: ${{ secrets.PACKAGER_TOKEN }}
- name: Docker Manifest
run: |
docker manifest create code.nephatrine.net/nephnet/docker-registry:${{ gitea.ref_name }} --amend code.nephatrine.net/nephnet/docker-registry:${{ gitea.ref_name }}-amd64 --amend code.nephatrine.net/nephnet/docker-registry:${{ gitea.ref_name }}-arm64v8
docker manifest push --purge code.nephatrine.net/nephnet/docker-registry:${{ gitea.ref_name }}
publishamd64:
if: gitea.repository_owner == 'NephNET' && gitea.ref_name == 'master'
needs: [buildamd64]
runs-on: nephnet
steps:
- name: Check Base Image
if: github.event_name != 'push'
uses: actions/docker-base-image-check@v1.2.1
id: checkbase
with:
base-image: nephatrine/alpine-s6:latest-amd64
image: nephatrine/docker-registry:latest-amd64
- name: Docker Login
uses: actions/docker-login@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Docker Push
run: |
docker tag code.nephatrine.net/nephnet/docker-registry:master-amd64 nephatrine/docker-registry:latest-amd64
docker push nephatrine/docker-registry:latest-amd64
- name: Notify Discord
if: github.event_name == 'push' || steps.checkbase.outputs.needs-updating == 'true'
uses: actions/discord-status@v1
with:
title: "DockerHub: docker-registry"
description: "The container image was pushed to [DockerHub](https://hub.docker.com/repository/docker/nephatrine/docker-registry/general).\nPull `nephatrine/docker-registry:latest-amd64` for the newest image."
nodetail: true
webhook: ${{ secrets.DISCORD_WEBHOOK_PACKAGE }}
publisharm64:
if: gitea.repository_owner == 'NephNET' && gitea.ref_name == 'master'
needs: [buildarm64]
runs-on: nephnet-arm64
steps:
- name: Docker Login
uses: actions/docker-login@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Docker Push
run: |
docker tag code.nephatrine.net/nephnet/docker-registry:master-arm64v8 nephatrine/docker-registry:latest-arm64v8
docker push nephatrine/docker-registry:latest-arm64v8
manifesthub:
if: gitea.repository_owner == 'NephNET' && gitea.ref_name == 'master'
needs: [publishamd64, publisharm64]
runs-on: nephnet
steps:
- name: Docker Login
uses: actions/docker-login@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Docker Manifest
run: |
docker manifest create nephatrine/docker-registry:latest --amend nephatrine/docker-registry:latest-amd64 --amend nephatrine/docker-registry:latest-arm64v8
docker manifest push --purge nephatrine/docker-registry:latest

View File

@ -0,0 +1,14 @@
name: Build Container Image
run-name: ${{ gitea.actor }} pushed to ${{ gitea.repository }}:${{ gitea.ref_name }}
on:
pull_request:
types: [ opened, synchronize, ready_for_review ]
jobs:
build:
if: gitea.actor == 'nephatrine' && gitea.event.pull_request.draft == false
runs-on: nephnet
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Docker Build
run: docker build --pull ${{ gitea.workspace }}

View File

@ -1,4 +1,4 @@
Copyright © 2021 Daniel Wolf <<nephatrine@gmail.com>>
Copyright © 2023 Daniel Wolf <<nephatrine@gmail.com>>
**Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above

View File

@ -1,21 +1,16 @@
[Git](https://code.nephatrine.net/nephatrine/docker-registry/src/branch/master) |
[Git](https://code.nephatrine.net/NephNET/docker-registry/src/branch/master) |
[Docker](https://hub.docker.com/r/nephatrine/docker-registry/) |
[unRAID](https://code.nephatrine.net/nephatrine/unraid-containers)
[![Build Status](https://ci.nephatrine.net/api/badges/nephatrine/docker-registry/status.svg?ref=refs/heads/master)](https://ci.nephatrine.net/nephatrine/docker-registry)
# Docker Registry
This docker image contains a Docker Registry server to self-host your own
docker registry.
**YOU WILL NEED TO USE A SEPARATE REVERSE PROXY SERVER TO SECURE THIS SERVICE.
SEE THE [DOCUMENTATION](https://docs.docker.com/registry/recipes/nginx/) FOR
MORE DETAILS ON HOW TO CONFIGURE SUCH A PROXY.**
To secure this service, we suggest a separate reverse proxy server, such as an
[NGINX](https://nginx.com/) container.
- [Alpine Linux](https://alpinelinux.org/)
- [Skarnet Software](https://skarnet.org/software/)
- [S6 Overlay](https://github.com/just-containers/s6-overlay)
- [Alpine Linux](https://alpinelinux.org/) w/ [S6 Overlay](https://github.com/just-containers/s6-overlay)
- [Docker Registry](https://docs.docker.com/registry/)
You can spin up a quick temporary test container like this: