build(woodpecker): run on cron and push to main

Also removed sha hash from some docker images.
This commit is contained in:
Paul Campbell 2024-04-07 17:27:05 +01:00
parent 161377f54d
commit ac37e9e199
4 changed files with 28 additions and 19 deletions

View file

@ -1,4 +1,5 @@
steps: steps:
update-builder-image: update-builder-image:
when: when:
- event: cron - event: cron
@ -12,11 +13,19 @@ steps:
registry: git.kemitix.net registry: git.kemitix.net
password: password:
from_secret: woodpecker-docker-push from_secret: woodpecker-docker-push
build: build:
when:
- event: push
branch: main
image: git.kemitix.net/kemitix/git-next-builder:latest image: git.kemitix.net/kemitix/git-next-builder:latest
environment: environment:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
lint: lint:
when:
- event: push
branch: main
image: git.kemitix.net/kemitix/git-next-builder:latest image: git.kemitix.net/kemitix/git-next-builder:latest
environment: environment:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
@ -24,15 +33,13 @@ steps:
- ls -l /usr/local/cargo/bin/ - ls -l /usr/local/cargo/bin/
- cargo fmt --all -- --check - cargo fmt --all -- --check
- cargo clippy -- -D warnings -W clippy::nursery -W clippy::unwrap_used -W clippy::expect_used - cargo clippy -- -D warnings -W clippy::nursery -W clippy::unwrap_used -W clippy::expect_used
when:
- event: pull_request
- event: cron
test: test:
when:
- event: push
branch: main
image: git.kemitix.net/kemitix/git-next-builder:latest image: git.kemitix.net/kemitix/git-next-builder:latest
environment: environment:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
commands: commands:
- cargo test - cargo test
when:
- event: pull_request
- event: cron

View file

@ -1,6 +1,10 @@
# INFO: https://woodpecker-ci.org/plugins/Docker%20Buildx # INFO: https://woodpecker-ci.org/plugins/Docker%20Buildx
steps: steps:
docker-build: docker-build:
when:
- event: tag
ref: refs/tags/v*
image: docker.io/woodpeckerci/plugin-docker-buildx:3.2.1 image: docker.io/woodpeckerci/plugin-docker-buildx:3.2.1
settings: settings:
username: kemitix username: kemitix
@ -14,8 +18,3 @@ steps:
registry: git.kemitix.net registry: git.kemitix.net
password: password:
from_secret: woodpecker-docker-push from_secret: woodpecker-docker-push
when:
- event: push
branch: main
- event: tag
ref: refs/tags/v*

View file

@ -1,13 +1,14 @@
# INFO: https://woodpecker-ci.org/plugins/Gitea%20Release # INFO: https://woodpecker-ci.org/plugins/Gitea%20Release
steps: steps:
publish: publish:
image: docker.io/woodpeckerci/plugin-gitea-release:0.3.1@sha256:ec26c974254a7524310ffcdb0e46f9141988b4e239cbb812a341b781f10e7cbd when:
- event: tag
ref: refs/tags/v*
image: docker.io/woodpeckerci/plugin-gitea-release:0.3.1
settings: settings:
base_url: https://git.kemitix.net base_url: https://git.kemitix.net
api_key: api_key:
from_secret: FORGEJO_RELEASE_PLUGIN from_secret: FORGEJO_RELEASE_PLUGIN
target: main target: main
prerelease: true prerelease: true
when:
- event: tag
ref: refs/tags/v*

View file

@ -1,12 +1,14 @@
# INFO: https://woodpecker-ci.org/plugins/TODO-Checker # INFO: https://woodpecker-ci.org/plugins/TODO-Checker
steps: steps:
todo_check: todo_check:
image: codeberg.org/epsilon_02/todo-checker:1.1.1@sha256:58ebb185706a56147b588be612aa16579c007fa6213a5b46ae01b4e0341dd946 image: codeberg.org/epsilon_02/todo-checker:1.1.1
when:
- event: push
branch: main
- event: cron
settings: settings:
# git-next-woodpecker-todo-checker - read:issue # git-next-woodpecker-todo-checker - read:issue
repository_token: '776a3b928b852472c2af727a360c85c00af64b9f' repository_token: '776a3b928b852472c2af727a360c85c00af64b9f'
prefix_regex: "(#|//) (TODO|FIXME): " prefix_regex: "(#|//) (TODO|FIXME): "
debug: false debug: false
when:
- event: pull_request
- event: cron