ci: build mkdocs image periodically

This commit is contained in:
Wez Furlong
2024-07-03 15:26:48 -07:00
parent 32330758a9
commit 68e01e00cf
+50
View File
@@ -0,0 +1,50 @@
labels:
platform: linux/amd64
when:
- event: push
branch:
- main
path: &paths
include:
- .woodpecker/doc-image-builder.yml
- "docs/Dockerfile"
- "crates/toml2jsonc/**"
- event: pull_request
path: *paths
- event: manual
- event: cron
cron: build-builder
variables:
- &docker_credentials
username:
from_secret: gh_package_publish_user
password:
from_secret: gh_package_publish_token
steps:
build-builder-no-publish:
image: plugins/docker
when:
- evaluate: 'CI_PIPELINE_EVENT == "pull_request" || (CI_PIPELINE_EVENT == "push" && CI_COMMIT_BRANCH != "main")'
settings:
registry: ghcr.io
repo: "ghcr.io/kumocorp/mkdocs-material"
dry_run: true
tags:
- latest
dockerfile: docs/Dockerfile
publish-builder:
image: plugins/docker
when:
- evaluate: '(CI_PIPELINE_EVENT != "pull_request") && CI_COMMIT_BRANCH == "main"'
settings:
<<: *docker_credentials
registry: ghcr.io
repo: "ghcr.io/kumocorp/mkdocs-material"
tags:
- latest
dockerfile: docs/Dockerfile