2024-05-14 07:40:38 +02:00
|
|
|
when:
|
|
|
|
- event: [pull_request, tag, cron]
|
|
|
|
- event: push
|
|
|
|
branch:
|
|
|
|
- ${CI_REPO_DEFAULT_BRANCH}
|
|
|
|
|
|
|
|
variables:
|
2024-12-08 01:02:15 +01:00
|
|
|
- &build_plugin 'woodpeckerci/plugin-docker-buildx:5.1.0'
|
2024-05-14 07:40:38 +02:00
|
|
|
# deployment targets
|
2024-05-14 10:24:21 +02:00
|
|
|
# TODO: Disabled docker hub target until first release is ready / Rate Limits
|
2024-05-14 11:25:37 +02:00
|
|
|
- &publish_repos 'ocram85/plugin-gitea-package,gitea.ocram85.com/plugins/gitea-package'
|
|
|
|
#- &publish_repos 'gitea.ocram85.com/plugins/gitea-package'
|
2024-05-14 07:40:38 +02:00
|
|
|
# logins for deployment targets
|
|
|
|
- publish_logins: &publish_logins
|
|
|
|
# Default DockerHub login
|
2024-05-14 11:25:37 +02:00
|
|
|
- registry: https://index.docker.io/v1/
|
|
|
|
username:
|
|
|
|
from_secret: docker_user
|
|
|
|
password:
|
|
|
|
from_secret: docker_passwd
|
2024-05-14 10:24:21 +02:00
|
|
|
# Additional Gitea login
|
2024-05-14 07:40:38 +02:00
|
|
|
- registry: https://gitea.ocram85.com
|
|
|
|
username:
|
|
|
|
from_secret: gitea_user
|
|
|
|
password:
|
|
|
|
from_secret: gitea_passwd
|
|
|
|
|
|
|
|
steps:
|
2024-05-16 12:12:31 +02:00
|
|
|
lint-dockerfile:
|
|
|
|
image: hadolint/hadolint:v2.12.1-beta-alpine
|
|
|
|
commands:
|
|
|
|
#- cat Dockerfile
|
|
|
|
#- hadolint --verbose --ignore DL3003 --ignore DL3018 Dockerfile
|
|
|
|
- hadolint --ignore DL3003 --ignore DL3018 Dockerfile
|
|
|
|
#when:
|
|
|
|
# path: "Dockerfile"
|
|
|
|
|
|
|
|
lint-markdown:
|
2024-09-09 11:02:29 +02:00
|
|
|
image: davidanson/markdownlint-cli2:v0.14.0
|
2024-05-16 12:12:31 +02:00
|
|
|
commands:
|
|
|
|
- "markdownlint-cli2 *.{md,markdown}"
|
|
|
|
when:
|
|
|
|
path: "*.{md,markdown}"
|
|
|
|
|
|
|
|
lint-editorconfig:
|
|
|
|
depends_on: []
|
2024-07-09 15:30:01 +02:00
|
|
|
image: docker.io/mstruebing/editorconfig-checker:v3.0.3
|
2024-05-16 12:12:31 +02:00
|
|
|
when:
|
|
|
|
event: pull_request
|
|
|
|
|
2024-05-14 07:40:38 +02:00
|
|
|
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}
|