add woodpecker pipeline
This commit is contained in:
parent
da2d91733b
commit
f5fcb2a71a
9 changed files with 107 additions and 15 deletions
|
@ -10,3 +10,6 @@ end_of_line = lf
|
|||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.py]
|
||||
indent_size = 4
|
||||
|
|
|
@ -9,7 +9,15 @@ repos:
|
|||
hooks:
|
||||
- id: generate-readme
|
||||
name: Generate README
|
||||
entry: python generate-readme.py
|
||||
entry: python scripts/generate-readme.py
|
||||
language: python
|
||||
pass_filenames: false
|
||||
files: ^images\.json$
|
||||
- id: generate-build-pipeline
|
||||
name: Generate build pipeline
|
||||
entry: python scripts/generate-build-pipeline.py
|
||||
language: python
|
||||
pass_filenames: false
|
||||
files: ^images\.json$
|
||||
additional_dependencies:
|
||||
- pyyaml
|
||||
|
|
44
.woodpecker/build.yaml
Normal file
44
.woodpecker/build.yaml
Normal file
|
@ -0,0 +1,44 @@
|
|||
# GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
steps:
|
||||
- directory: ./beeper_bridge-manager
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
name: publish beeper_bridge-manager
|
||||
settings:
|
||||
dockerfile: ./docker/Dockerfile
|
||||
password:
|
||||
from_secret: docker_token
|
||||
platforms: linux/amd64,linux/arm64
|
||||
registry: git.jakew.me
|
||||
repo: git.jakew.me/${CI_REPO_OWNER}/beeper_bridge-manager
|
||||
tags: latest
|
||||
username: ${CI_REPO_OWNER}
|
||||
- directory: ./matterbridge
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
name: publish matterbridge_whatsappmulti
|
||||
settings:
|
||||
dockerfile: ./Dockerfile_whatsappmulti
|
||||
password:
|
||||
from_secret: docker_token
|
||||
platforms: linux/amd64,linux/arm64
|
||||
registry: git.jakew.me
|
||||
repo: git.jakew.me/${CI_REPO_OWNER}/matterbridge_whatsappmulti
|
||||
tags: latest
|
||||
username: ${CI_REPO_OWNER}
|
||||
- directory: ./custom-caddy
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
name: publish custom-caddy
|
||||
settings:
|
||||
dockerfile: ./Dockerfile
|
||||
password:
|
||||
from_secret: docker_token
|
||||
platforms: linux/amd64,linux/arm64
|
||||
registry: git.jakew.me
|
||||
repo: git.jakew.me/${CI_REPO_OWNER}/custom-caddy
|
||||
tags: latest
|
||||
username: ${CI_REPO_OWNER}
|
||||
when:
|
||||
- branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||
event: push
|
||||
- event: manual
|
||||
- cron: weekly
|
||||
event: cron
|
11
.woodpecker/pre-commit.yaml
Normal file
11
.woodpecker/pre-commit.yaml
Normal file
|
@ -0,0 +1,11 @@
|
|||
when:
|
||||
- event: [push, pull_request, manual]
|
||||
|
||||
steps:
|
||||
- name: pre-commit
|
||||
image: python:alpine
|
||||
commands:
|
||||
- apk add --update --no-cache git
|
||||
- pip install --root-user-action ignore pre-commit
|
||||
- ls -lah
|
||||
- pre-commit run --all-files
|
|
@ -6,7 +6,6 @@ These are some custom images that are regularly built for AMD64 and ARM64 archit
|
|||
| Name | Description |
|
||||
| --- | --- |
|
||||
| `ghcr.io/jake-walker/beeper_bridge-manager` | This is an exact build of Beeper's [bridge-manager](https://github.com/beeper/bridge-manager) but with an ARM64 build. |
|
||||
| `ghcr.io/jake-walker/gitea-jupyter` | This is the default Gitea image with a Jupyter notebook renderer installed. [Extra configuration](https://blog.gitea.com/render-jupyter-notebooks/#configuring-gitea-to-use-the-converter) is required to enable this. |
|
||||
| `ghcr.io/jake-walker/matterbridge_whatsappmulti` | A build of the matterbridge WhatsApp multi image. |
|
||||
| `ghcr.io/jake-walker/custom-caddy` | A custom build of Caddy with the plugins: [WebDAV](https://github.com/mholt/caddy-webdav), [replace_response handler](https://github.com/caddyserver/replace-response), [cloudflare](https://github.com/caddy-dns/cloudflare). |
|
||||
<!-- generate end -->
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
FROM gitea/gitea:latest
|
||||
|
||||
RUN apk add --update --no-cache py-pip \
|
||||
&& pip install --no-cache-dir --break-system-packages nbconvert
|
12
images.json
12
images.json
|
@ -2,25 +2,19 @@
|
|||
{
|
||||
"name": "beeper_bridge-manager",
|
||||
"context": "./beeper_bridge-manager",
|
||||
"dockerfile": "./beeper_bridge-manager/docker/Dockerfile",
|
||||
"dockerfile": "./docker/Dockerfile",
|
||||
"description": "This is an exact build of Beeper's [bridge-manager](https://github.com/beeper/bridge-manager) but with an ARM64 build."
|
||||
},
|
||||
{
|
||||
"name": "gitea-jupyter",
|
||||
"context": "./gitea-jupyter",
|
||||
"dockerfile": "./gitea-jupyter/Dockerfile",
|
||||
"description": "This is the default Gitea image with a Jupyter notebook renderer installed. [Extra configuration](https://blog.gitea.com/render-jupyter-notebooks/#configuring-gitea-to-use-the-converter) is required to enable this."
|
||||
},
|
||||
{
|
||||
"name": "matterbridge_whatsappmulti",
|
||||
"context": "./matterbridge",
|
||||
"dockerfile": "./matterbridge/Dockerfile_whatsappmulti",
|
||||
"dockerfile": "./Dockerfile_whatsappmulti",
|
||||
"description": "A build of the matterbridge WhatsApp multi image."
|
||||
},
|
||||
{
|
||||
"name": "custom-caddy",
|
||||
"context": "./custom-caddy",
|
||||
"dockerfile": "./custom-caddy/Dockerfile",
|
||||
"dockerfile": "./Dockerfile",
|
||||
"description": "A custom build of Caddy with the plugins: [WebDAV](https://github.com/mholt/caddy-webdav), [replace_response handler](https://github.com/caddyserver/replace-response), [cloudflare](https://github.com/caddy-dns/cloudflare)."
|
||||
}
|
||||
]
|
||||
|
|
37
scripts/generate-build-pipeline.py
Normal file
37
scripts/generate-build-pipeline.py
Normal file
|
@ -0,0 +1,37 @@
|
|||
import json
|
||||
|
||||
import yaml
|
||||
|
||||
with open("images.json", "r") as f:
|
||||
images_data = json.load(f)
|
||||
|
||||
with open(".woodpecker/build.yaml", "w") as f:
|
||||
f.write("# GENERATED CODE - DO NOT MODIFY BY HAND\n")
|
||||
yaml.dump(
|
||||
{
|
||||
"when": [
|
||||
{"event": "push", "branch": "${CI_REPO_DEFAULT_BRANCH}"},
|
||||
{"event": "manual"},
|
||||
{"event": "cron", "cron": "weekly"},
|
||||
],
|
||||
"steps": [
|
||||
{
|
||||
"name": f"publish {image['name']}",
|
||||
"image": "woodpeckerci/plugin-docker-buildx",
|
||||
"settings": {
|
||||
"repo": f"git.jakew.me/${{CI_REPO_OWNER}}/{image['name']}",
|
||||
"registry": "git.jakew.me",
|
||||
"dockerfile": image["dockerfile"],
|
||||
"platforms": "linux/amd64,linux/arm64",
|
||||
"tags": "latest",
|
||||
"username": "${CI_REPO_OWNER}",
|
||||
"password": {"from_secret": "docker_token"},
|
||||
},
|
||||
"directory": image["context"],
|
||||
}
|
||||
for image in images_data
|
||||
],
|
||||
},
|
||||
f,
|
||||
default_flow_style=False,
|
||||
)
|
Loading…
Reference in a new issue