Files
eleith 85b1b3bac5
ci/woodpecker/push/build-docker Pipeline was successful
ci/woodpecker/tag/build-docker Pipeline was successful
fix docker target
2025-12-17 17:03:08 -08:00

113 lines
2.7 KiB
YAML

workspace:
base: /workspace
path: app
when:
- event: push
branch: main
path:
include:
- "**/*.go"
- "**/*.gohtml"
- ".woodpecker/build-docker.yml"
- "Dockerfile"
exclude:
- "**/*.md"
on_empty: true
- event: tag
ref: "refs/tags/v*.*.*"
steps:
vendor:
image: golang:1.24.5-alpine
commands:
- go mod vendor
lint:
image: golang:1.24.5-alpine
commands:
- go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.3.0
- golangci-lint run -v
test:
image: golang:1.24.5-alpine
commands:
- ./scripts/check-coverage.sh 60
extract-semver-tags:
image: alpine/git:latest
commands:
- |
VERSION_FULL="${CI_COMMIT_TAG#v}"
VERSION_MAJOR=$(echo "$VERSION_FULL" | cut -d. -f1)
VERSION_MINOR=$(echo "$VERSION_FULL" | cut -d. -f2)
SEMVER_FULL="$VERSION_FULL"
SEMVER_MAJOR_MINOR="$VERSION_MAJOR.$VERSION_MINOR"
SEMVER_MAJOR="$VERSION_MAJOR"
echo "Extracted versions: $SEMVER_FULL, $SEMVER_MAJOR_MINOR, $SEMVER_MAJOR, "
echo -e "$SEMVER_FULL\n$SEMVER_MAJOR\n$SEMVER_MAJOR_MINOR" >> .tags
cat .tags
when:
- event: tag
build-docker-main:
image: woodpeckerci/plugin-docker-buildx:6.0.1
settings:
repo: git.eleith.com/eleith.private/miniflux-digest
username: eleith
dockerfile: Dockerfile
registry: https://git.eleith.com
password:
from_secret: gitea_docker_registry
tags:
- latest
when:
- event: push
branch: main
build-docker-tag:
image: woodpeckerci/plugin-docker-buildx:6.0.1
settings:
repo: git.eleith.com/eleith.private/miniflux-digest
username: eleith
dockerfile: Dockerfile
registry: https://git.eleith.com
password:
from_secret: gitea_docker_registry
tags_file: .tags
when:
- event: tag
notify-success:
image: deblan/woodpecker-email:3.2.0
settings:
dsn:
from_secret: woodpecker_email_dsn
from:
address:
from_secret: woodpecker_email_from_address
name:
from_secret: woodpecker_email_from_name
recipients:
from_secret: woodpecker_email_recipient
level: success
recipients_only: true
when:
- status: [success]
notify-failure:
image: deblan/woodpecker-email:3.2.0
settings:
dsn:
from_secret: woodpecker_email_dsn
from:
address:
from_secret: woodpecker_email_from_address
name:
from_secret: woodpecker_email_from_name
recipients:
from_secret: woodpecker_email_recipient
level: failure
recipients_only: true
when:
- status: [failure]