From 4bd4ee2288a2745edb6fa51733b06a3516dfd8b5 Mon Sep 17 00:00:00 2001 From: OCram85 Date: Thu, 7 Dec 2023 10:20:46 +0100 Subject: [PATCH] add woodpecker --- .gitea/PULL_REQUEST_TEMPLATE.md | 19 ++++++++ .woodpecker/ci.yml | 82 +++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 .gitea/PULL_REQUEST_TEMPLATE.md create mode 100644 .woodpecker/ci.yml diff --git a/.gitea/PULL_REQUEST_TEMPLATE.md b/.gitea/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..0bcb04c --- /dev/null +++ b/.gitea/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,19 @@ +#### :book: Summary + + + +#### :bookmark_tabs: Test Plan + +> :bulb: Select your test plan for the code changes. + +- [x] CI pipeline tests +- [ ] Custom test +- [ ] No test plan + +##### Details / Justification + + + +#### :books: Additional Notes + + \ No newline at end of file diff --git a/.woodpecker/ci.yml b/.woodpecker/ci.yml new file mode 100644 index 0000000..a4d516d --- /dev/null +++ b/.woodpecker/ci.yml @@ -0,0 +1,82 @@ +when: + - event: [pull_request, tag, cron] + - event: push + branch: + - ${CI_REPO_DEFAULT_BRANCH} + +variables: + - &build_plugin 'woodpeckerci/plugin-docker-buildx:2.3.0' + # deployment targets + - &publish_repos 'ocram85/caddy-gitea,gitea.ocram85.com/ocram85/caddy-gitea' + # logins for deployment targets + - publish_logins: &publish_logins + # Default DockerHub login + - registry: https://index.docker.io/v1/ + username: + from_secret: docker_user + password: + from_secret: docker_passwd + # Additional Quay.IO login + - registry: https://gitea.ocram85.com + username: + from_secret: gitea_user + password: + from_secret: gitea_passwd + +steps: + test: + image: *build_plugin + settings: + dry_run: true + registry: gitea.ocram85.com + repo: test + dockerfile: Dockerfile + platforms: linux/amd64 + auto_tag: true + build_args: + - VERSION=${CI_COMMIT_TAG:-PR ${CI_COMMIT_PULL_REQUEST}} + - TAG=${CI_COMMIT_TAG} + when: + event: pull_request + branch: ${CI_REPO_DEFAULT_BRANCH} + + publish: + image: *build_plugin + settings: + repo: *publish_repos + dockerfile: Dockerfile + platforms: linux/amd64 + auto_tag: true + logins: *publish_logins + build_args: + - VERSION=${CI_COMMIT_TAG:-PR ${CI_COMMIT_PULL_REQUEST}} + - TAG=${CI_COMMIT_TAG} + when: + event: [push, tag, cron] + branch: ${CI_REPO_DEFAULT_BRANCH} + + build-next: + image: *build_plugin + settings: + repo: *publish_repos + dockerfile: Dockerfile + platforms: linux/amd64 + tag: next + logins: *publish_logins + build_args: + - VERSION=${CI_COMMIT_TAG:-PR ${CI_COMMIT_PULL_REQUEST}} + - TAG=${CI_COMMIT_TAG} + when: + event: [pull_request] + + gitea-release: + image: plugins/gitea-release + settings: + api_key: + from_secret: RENOVATE_TOKEN + base_url: https://gitea.ocram85.com + title: ${CI_COMMIT_TAG} + note: "> :bulb: **Note:** See [CHANGELOG.md](src/branch/master/CHANGELOG.md) for recent changes." + when: + event: [tag] + branch: ${CI_REPO_DEFAULT_BRANCH} \ No newline at end of file